On Fri, Oct 9, 2009 at 10:53 PM, Andrzej Bialecki <a...@getopt.org> wrote:
> Hi, > > What's the canonical way to pass an update request to another handler? I'm > implementing a handler that has to dispatch its result to different update > handlers based on its internal processing. > > An update request? There's always only one UpdateHandler registered in Solr. > Getting a handler from SolrCore.getRequestHandler(handlerName) makes the > implementation dependent on deployment paths defined in solrconfig.xml. > Using SolrCore.getRequestHandlers(handler.class) often returns the > LazyRequestHandlerWrapper, from which it's not possible to retrieve the > wrapped instance of the handler .. > > You must know the name of the handler you are going to invoke. Or if you are sure that there is only one instance, knowing the class name will let you know the handler name. Then the easiest way to invoke it would be to use a LocalSolrQueryRequest with qt as the handler name. See QuerySenderListener for an example. -- Regards, Shalin Shekhar Mangar.