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 Andy Olliver <an...@semantico.com> on 2008/02/13 23:18:02 UTC
Multicore - Querying unloaded core returns results from default
Hi
When using multiple cores I can query loaded cores using:
http://localhost:8080/solr-HEAD/[CORE_NAME]/select?....
and all works nicely.
I can also query non-loaded cores and get a response from the default core.
http://localhost:8080/solr-HEAD/[NON_EXISTENT_CORE]/select?....
Would it be best for this result in an error response?
Andy
Re: Multicore - Querying unloaded core returns results from default
Posted by Andy Olliver <an...@semantico.com>.
This code in SolrDispatchFilter seems to pick first known core in cases
where core name is not recognised.
##
if( core == null ) {
Collection<SolrCore> cores = multicore.getCores();
if( cores != null && cores.size() > 0 ) {
core = cores.iterator().next();
}
if( core == null ) {
throw new RuntimeException( "MultiCore request can not find a
valid core" );
}
}
##
the Runtime exception is only thrown if no cores are defined at all.
Andy
> Hi
>
> When using multiple cores I can query loaded cores using:
> http://localhost:8080/solr-HEAD/[CORE_NAME]/select?....
> and all works nicely.
>
> I can also query non-loaded cores and get a response from the default
> core.
> http://localhost:8080/solr-HEAD/[NON_EXISTENT_CORE]/select?....
> Would it be best for this result in an error response?
>
> Andy
>
>