On 5/21/2014 3:15 PM, cpalm wrote: > Yes we use that to force the data dir to be someplace other than solr.home. > Removing the data dir field just puts the data in solr home, which isn't > desirable. > solr home is specified in conf/Catalina/localhost/solr.xml > <Context docBase="/etc/solr/solr.war" debug="0" crossContext="true"> > <Environment name="solr/home" type="java.lang.String" value="/etc/solr" > override="true"/> > </Context> > > Is there any way to use the collections api with a data.dir set?
The default location for the dataDir is ./data, relative to the core's instanceDir, which itself is normally relative to solr home. It doesn't make any sense to set the dataDir with the collections API, because the directory would have to be different for every core the API call creates. You could possibly argue that you want to do a relative directory here, but I don't really see the point of that either. With SolrCloud, the only things that will be in your instanceDir will be the data directory and one or more .properties files, so there is not a compelling argument for separating instanceDir from dataDir. With a non-cloud install, you would have a conf directory as well, and it can make sense to keep that separate ... but with SolrCloud, the contents that would normally be in the conf directory are in Zookeeper instead. Here's a directory listing of an instanceDir on a 4.2.1 SolrCloud install. The solr home here is /index/mbsolr4, the core is named uniphoto_shard1_replica1, because the collection is named uniphoto: [root@mbsolr1a uniphoto_shard1_replica1]# pwd /index/mbsolr4/uniphoto_shard1_replica1 [root@mbsolr1a uniphoto_shard1_replica1]# ls -al total 12 drwxr-xr-x 3 solr solr 4096 Apr 10 2013 . drwxr-xr-x 11 solr solr 4096 Feb 25 14:42 .. drwxr-xr-x 4 solr solr 4096 Nov 30 10:26 data If you don't have a solr.xml file (as you mentioned in a later email) then Solr will not be running in multicore mode, and I have to wonder whether SolrCloud will function correctly in that mode. I would not expect it to work right. Thanks, Shawn