lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <s...@elyograg.org>
Subject Re: create cores dynamically
Date Sun, 03 Mar 2013 16:30:41 GMT
On 3/2/2013 8:18 PM, adeelmahmood wrote:
> I am not sure if I understand how the creating cores dynamically
> functionality is supposed to work. From what I have sort of figured out is
> that I need to specify the instanceDir as the path to a directory which
> contains the conf file. So I have directory as template for configuration
> files but when I use this path, solr adds the data directory next to this
> template conf directory which defeats the purpose. I was hoping that it will
> copy the template files into a new directory created for the core. Is that
> not how its supposed to work.

In solr.xml, instanceDir is relative to solr.solr.home, which defaults 
to solr, relative to the current working directory.  The solr.solr.home 
directory is where solr.xml lives.  Inside instanceDir, solr looks in 
conf to find the config.  The value for dataDir defaults to data, 
relative to instanceDir.  I don't think instanceDir has a default value, 
but I could be wrong about that.

Here's what I use, with solr.solr.home set to /index/solr4:

<core loadOnStartup="true" instanceDir="cores/ncmain/" transient="false" 
name="ncmain" dataDir="../../data/ncmain"/>

This means that all config directories are under /index/solr4/cores and 
all index directories are under /index/solr4/data ... I can easily 
delete all the data without touching the configs.

For another installation where I'm using SolrCloud, it is set up a 
almost the same, but it's still separated because the active configs are 
in zookeeper, with a backup copy on the disk.

Thanks,
Shawn


Mime
View raw message