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. Erick Erickson wrote > The data _is_ separated from the code. It's all relative > to solr_home which need not have any relation to where > the code is executing from. > > For instance, I can start Solr like > java -Dsolr.solr.home=/Users/Erick/testdir/solr -jar start.jar > > and have my war in a completely different place. > > Best, > Erick > > > On Tue, Nov 26, 2013 at 1:08 AM, adfel70 < > adfel70@ > > wrote: > >> Thanks for the reply, Erick. >> Actually, I didnt not think this through. I just thought it would be a >> good >> idea to separate the data from the application code. >> I guess I'll leave it without setting the datadir parameter and add a >> symlink. >> >> >> >> -- >> View this message in context: >> http://lucene.472066.n3.nabble.com/Setting-solr-data-dir-for-SolrCloud-instance-tp4103052p4103228.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> -- View this message in context: http://lucene.472066.n3.nabble.com/Setting-solr-data-dir-for-SolrCloud-instance-tp4103052p4103334.html Sent from the Solr - User mailing list archive at Nabble.com.