: as I said we have our own search handler (wrapping handleRequestBody method
: and adding logic before it) where we convert those custom_paramX params into
: Solr understandable params like q, fq, facet, etc. Then we delegate to Solr to
: process them.
: 
: So what I want to do is core0 handle things if custom_param1=aaa and core1 if
: custom_param1=ccc.

Ah.. i think i'm understanding:
 * you know you need a custom search handler
 * you have a custom search handler that delegates to some other handler 
based on some logic
 * your customer handler modifies the request params before delegating to
the handler it picks.
 * the part you are missing is how to delegate to an entirely differnet 
SolrCore.

does that capture your question?

The nutshell is you would need to ask your current SolrCore for access to 
the CoreContainer -- then create a new "LocalSolrQueryRequest" and ask 
that SolrCore to execute it.  one hitch to watch out for is keeping track 
of thinkgs like the SolrIndexSearcher used -- because stuff like "DocList" 
values in the response will come from the *other* SolrIndexSearcher, and 
you'll need to use that when writting the response out (because the 
QueryResponseWriter needs to as the SolrInexSearcher for the stored fields 
from those docids).

(Note: i have never tried this ... there may be other gotcha's i'm not 
aware of)






-Hoss

Reply via email to