Open torvalds-dev opened 12 months ago
The configuration for the data directory in Solr is typically found in the solrconfig.xml
file. This file is located in the conf
directory of each Solr core or collection.
In the provided XML files, the data directory is configured with the <dataDir>
tag. The value of this tag is set to ${solr.data.dir:}
, which means it will use the value of the solr.data.dir
system property if it is set, otherwise, it will default to an empty string.
Here are the relevant sections from the provided XML files:
File 1: solr/core/src/test-files/solr/collection1/conf/solrconfig-implicitproperties.xml
<config>
...
<dataDir>${solr.data.dir:}</dataDir>
...
</config>
File 2: solr/solrj-streaming/src/test-files/solrj/solr/configsets/ml/conf/solrconfig.xml
<config>
...
<dataDir>${solr.data.dir:}</dataDir>
...
</config>
If you need to change the data directory, you can do so by setting the solr.data.dir
system property to the desired path. This can be done when starting Solr by adding -Dsolr.data.dir=/path/to/data/dir
to the command line. Alternatively, you can directly modify the <dataDir>
tag in the solrconfig.xml
file to point to the desired directory, but this is not recommended as it can lead to inconsistencies if the system property is also set.
torvalds.dev is analyzing the ticket