I am very very sorry. My mail client was not working from work and it looked 
like it was not being delivered, that's why I tried a few times. Sorry 
everybody!

-----Original Message-----
From: Chris Hostetter [mailto:hossman_luc...@fucit.org] 
Sent: Friday, December 16, 2011 3:23 PM
To: solr-user@lucene.apache.org
Subject: Re: Call RequestHandler from QueryComponent


Maria: sending the same email 4 times in less the 48 hours isn't really a 
good way to encourange people to help you -- it just means more total mail 
people have to wade thorugh which slows them down and makes them less 
likeely to want to help.

: In ABC QUERY COMPONENT, I customize prepare() and process(). In its
: process() I want to call the /XYZ request handler and include those results
: in the results for ABC. Is that possible?

certianly -- you can execute any java code you wnat in a custom component, 
take a look at how SolrDispatchFilter exeuts the original request on the 
SolrCore, you can do something similar in your custom component (but 
you'll want to use a LocalSolrQueryRequest that you populate with params 
-- see the TestHarness for an example) and then take whatever data you 
want out of the "inner" SolrQueryResponse you get back and add it directly 
to the "outer" SolrQueryResponse.

One thing you might have to watch out for is ensuring that the same 
SolrIndexSearcher used in the outer request is also the one used in the 
inner request -- the consistency is crucial to ensuring any DocList 
you copy is meaninful -- but i'm not sure if you can do that easily with 
LocalSolrQueryRequest, you might need to tweak it.

-Hoss

Reply via email to