On 11/26/2013 9:19 AM, adfel70 wrote:
The problem we had was that we tried to run:
java -Dsolr.data.dir=/opt/solr/data -Dsolr.solr.home=/opt/solr/home -jar
start.jar
and got different behavior for how solr handles these 2 params.
we created 2 collections, which created 2 cores.
then we got 2 home dirs for the cores, as expected:
/opt/solr/home/collection1_shard1_replica1
/opt/solr/home/collection2_shard1_replica1
but instead of creating 2 data dirs like:
/opt/solr/data/collection1_shard1_replica1
/opt/solr/data/collection2_shard1_replica1
solr had both cores' data dirs pointing to the same directory -
/opt/solr/data
when we tried putting a relative path in -Dsolr.data.dir, it worked as
expected.
I don't know if this is a bug, but we thought of 2 solutions in our case:
1. point -Dsolr.data.dir to a relative path on symlink that path to the
absolute path we wanted in the first place.
2. dont provide -Dsolr.data.dir at all, and then solr puts the data dir
inside the home.dir, which as said, works with relative paths.
we chose the first option for now.
The dataDir is a per-core setting, you cannot set it for the entire
application. If you make it relative, then it will be relative to each
individual instanceDir. It defaults to ./data, so you get
$instanceDir/data as the location.
Thanks,
Shawn