On 7/14/2015 3:46 AM, sat wrote:
> I am running Solr Version 4.10.4.
> 
> When I change the dataDir-Parameter in solrconfig.xml and restart the
> Server, the change has no effect. The Index/Data path remains the standard
> ./data folder ?
> 
> What do I have to do, to change the location where my index/data is stored ?
> 
> Thank you!

The solrconfig.xml file is a bad place to configure dataDir.  It can
work, but I think that if you leave the ${solr.data.dir} part in that
definition (which is what is in the sample configs), then what you
define in solr.xml (old format) or core.properties (new solr.xml format,
and the only format for Solr 5.x) might take precedence.  It's better to
configure it in core.properties or solr.xml.

The default should only be changed if you have good reason.  I
personally think that we should comment dataDir in our sample
solrconfig.xml files, or maybe even remove it entirely.

I do define dataDir in my own setup, in core.properties, as
"../../data/XXX" where XXX is the same name as the instanceDir.  This
keeps all the dataDirs together and separate from the conf directories,
so I can quickly and easily delete all the data for a core (or even ALL
cores) without affecting the configs.

For users running SolrCloud, there is rarely a good reason to change
dataDir ... because the dataDir is usually the only thing in the
instanceDir that matters.  If there is a conf directory in a SolrCloud
core, it's completely ignored.

Thanks,
Shawn

Reply via email to