You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Kevin Osborn <os...@yahoo.com> on 2010/07/22 21:23:03 UTC

calling other core from request handler

I have a multi-core environment and a custom request handler. However, I have 
one place where I would like to have my request handler on coreA query to coreB. 
This is not distributed search. This is just an independent query to get some 
additional data.

I am also guaranteed that each server will have the same core set. I am also 
guaranteed that I will not be reloading cores (just indexes).

It looks I can 
call coreA.getCoreDescriptor().getCoreContainer().getCore("coreB"); and then get 
the Searcher and release it when I am done.

Is there a better way?

And it also appears that during the inform or init methods of my requestHandler, 
coreB is NOT guaranteed to already exist?


      

Re: calling other core from request handler

Posted by Chris Hostetter <ho...@fucit.org>.
: It looks I can 
: call coreA.getCoreDescriptor().getCoreContainer().getCore("coreB"); and then get 
: the Searcher and release it when I am done.
: 
: Is there a better way?

not really ... not unless you want to do it via HTTP to "localhost"

: And it also appears that during the inform or init methods of my requestHandler, 
: coreB is NOT guaranteed to already exist?

correct ... your RequestHandler shouldn't make any assumptions about the 
order that core's are initialized in.

-Hoss