Re: Dynamic core selection

2012-11-02 Thread Amit Nithian
I have done something similar in a search component for our search at Zvents.com. Our use case is where we have a core that invokes searches in other cores and merges the results together Basically we have: 1) FederatedComponent implements SolrCoreAware --> Grab instance of CoreContainer and store

Re: Dynamic core selection

2012-11-02 Thread Dzmitry Petrushenka
Hi all! Just sharing the solution) I've extended SolrDispatchFilter with my own implementation and did like this: ... String core = determineCore(req); super.doFilter(new CoreRoutingReqWrapper(req, core), response, chain); ... code for the CoreRoutingReqWrapper class: class CoreRoutingRe

Re: Dynamic core selection

2012-11-01 Thread Chris Hostetter
: 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 th

Re: Dynamic core selection

2012-11-01 Thread Dzmitry Petrushenka
The idea is to send req to http://server.com/solr. Here are some sample URLs: http://server.com/solr?custom_param1=aaa&custom_param2=bbb http://server.com/solr?custom_param1=ccc&custom_param2= as I said we have our own search handler (wrapping handleRequestBody method and adding logic be

Re: Dynamic core selection

2012-11-01 Thread Travis Low
If I understand you correctly, you would use a multicore setup and send the request to http://server.com/solr/core0 in one case, and http://server.com/solr/core1 in the other. Is there something else that makes this complicated? cheers, Travis On Thu, Nov 1, 2012 at 12:08 PM, Dzmitry Petrushenk

Dynamic core selection

2012-11-01 Thread Dzmitry Petrushenka
Hi All! I need to be able to send requests to 2 different cores based on the value of some request parameter. First core (active) contains most recent docs. This core is used in 99% of cases. The second core (it has 100-1000 times more docs then active core) and used in 0.1% of cases.