You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Ryan McKinley <ry...@gmail.com> on 2008/07/17 15:12:50 UTC

static access to multicore?

I'm trying to write a search component that queries another core.

This pointed out that there is no way to access MultiCore outside of  
SolrDispatchFilter.

If we were using spring, we could easily pass that reference into the  
component.  Without it, I think the best option is to add a static  
'instance' variable on MultiCore.  It will go away when we have some  
other option (spring).

thoughts?
ryan

Re: static access to multicore?

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com>.
SOLR-561 has added code to achieve this.
core.getCoreDesctiptor().getMultiCore() can give the instance of
multicore


On Thu, Jul 17, 2008 at 6:42 PM, Ryan McKinley <ry...@gmail.com> wrote:
> I'm trying to write a search component that queries another core.
>
> This pointed out that there is no way to access MultiCore outside of
> SolrDispatchFilter.
>
> If we were using spring, we could easily pass that reference into the
> component.  Without it, I think the best option is to add a static
> 'instance' variable on MultiCore.  It will go away when we have some other
> option (spring).
>
> thoughts?
> ryan



-- 
--Noble Paul

Re: static access to multicore?

Posted by Henrib <hb...@gmail.com>.


ryantxu wrote:
> 
> I'm trying to write a search component that queries another core.
> 

With Solr-561 core.getCoreDescriptor().getMultiCore() , we also avoid
reintroducing a singleton and keep an easier way to derive from Multicore &
instantiate.

Out of scope but does this relate to your previous questions about
spellchecking on multiple fields ? Just wondering if spellchecking could be
handled through a dedicated core...
-- 
View this message in context: http://www.nabble.com/static-access-to-multicore--tp18508157p18513338.html
Sent from the Solr - Dev mailing list archive at Nabble.com.