Shalin Shekhar Mangar wrote:
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.

Hm, yes - to be more specific, what I meant is that I need to pre-process an update request and then pass it on either to my own handler (which performs an update) or to the ExtractingRequestHandler (which also performs an update).



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

I do know the class name - ExtractingRequestHandler. But when I invoke SolrCore.getRequestHandler(Class) I get an empty map, because this handler is registered as lazy, and this means that it's represented as LazyRequestHandlerWrapper.

--
Best regards,
Andrzej Bialecki     <><
 ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com

Reply via email to