lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Childs <cjchi...@me.com>
Subject Re: "no such core" error with EmbeddedSolrServer
Date Fri, 06 Jan 2012 16:28:53 GMT
Multicore does work with EmbeddedSolrServer. It's what we use in our application.

solr.xml is also relevant for configuring the cores. We do not do it in quite the same manner
that Phillip is describing, though. Our CoreContainer is initialized by SolrDispatchFilter.
After the core container is created, we just do 'new EmbeddedSolrServer(cores, "firstCoreNameInSolrXml");'
-- it even worked without a core name specified, but the behavior was erratic and incorrect
in other ways in that case.

I would suggest enabling logging for the Solr classes that are likely to help explain some
of the mystery here: SolrResourceLoader, and CoreContainer. At the info level, they will tell
you where they are finding solr.xml and how they are finding it (whether it's passed in via
constructor arguments, or through solr.solr.home).

On Jan 6, 2012, at 11:03 AM, Erik Hatcher wrote:

> 
> On Jan 6, 2012, at 10:46 , Yury Kats wrote:
> 
>> On 1/6/2012 10:19 AM, Phillip Rhodes wrote:
>>> 2012/1/6 Yury Kats <yurykats@yahoo.com>:
>>>> 
>>>> Have you tried passing core name (collection1) to the c'tor, instead
>>>> of the empty string?
>>> 
>>> Yep, but that gives the same error (with the core name appended) such
>>> as "no such core: collection1"
>> 
>> That probably means the home is not set properly, so it can't find solr.xml
>> 
> 
> Again, EmbeddedSolrServer (unless I'm gravely mistaken!) doesn't do multicore.  It's
for a single core.  If you want multiple cores supported... created multiple EmbeddedSolrServer
instances.   You point the instance to the core's "home".
> 
> 	Erik
> 

-- 
Christopher Childs




Mime
View raw message