On 1/29/2015 12:08 AM, Clemens Wyss DEV wrote:
> Thx Shawn. I am running latest-greatest Solr (4.10.3)
> Solr home is e.g.
> /opt/webs/<siteX>/WebContent/WEB-INF/solr
> the core(s) reside in
> /opt/webs/<siteX>/WebContent/WEB-INF/solr/cores
> Should these be found by core discovery? 
> If not, how can I configure coreRootDirectory in sorl.xml to be "cores folder 
> below <slorHome>"
> 
> <str name="coreRootDirectory">${coreRootDirectory:<solrHome>/cores}</str>
> 
> Note:
> the solr.xml is to be used for any of our 150sites we host. Therefore like it 
> to be "generic" -> <solrHome>/cores

The first thing to say is that it is a bad idea to put your solr home
inside the extracted WAR.  The "WEB-INF" above is what makes me think
you have done this.  Extracted war directories can get wiped out at any
time, and we often recommend wiping them out manually in order to clear
up certain problems.

If there will only be core.properties files in that cores directory and
not any other location under the solr home, just remove
coreRootDirectory from the config entirely.  It will default to the solr
home and everything in "cores" will be found with no problem.  That
would only be a problem if you have core.properties files in some other
directory that is also underneath the solr home.  I think that's a bad
idea ... if you want a staging area where you create new cores manually,
keep it outside the solr home, to avoid confusing either yourself or Solr.

Relative paths should be possible in coreRootDirectory, but they are
currently resolved from the current working directory instead of the
solr home.  There's a bug report for that issue, but it is only fixed in
5.0, which isn't out yet.  I placed a note with the info above on the
Jira issue.  It's the last comment right now:

https://issues.apache.org/jira/browse/SOLR-6718

Since I converted to core discovery, my solr.xml file is extremely
minimal -- all the defaults work perfectly for me:

<?xml version="1.0" encoding="UTF-8" ?>
<solr>
</solr>

Thanks,
Shawn

Reply via email to