lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <>
Subject Re: Passing request to another handler
Date Sun, 11 Oct 2009 10:04:03 GMT
On Fri, Oct 9, 2009 at 10:53 PM, Andrzej Bialecki <> 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.

Shalin Shekhar Mangar.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message