You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Nabble User <ho...@gmail.com> on 2010/05/06 13:39:26 UTC

Any way to specify the data dir in Tomcat Context file?

I have Solr configured on Centos 5 with Tomcat 5.  I'd like to have several
solr instances on the machine that share the same solrconfig.xml file but
override the data directory and set their own data location.

Is there some way to override the data directory in the Tomcat context file?

I tried something below but it did not work.


<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/opt/solr/example/apache-solr-1.3.0.war" debug="0"
crossContext="true">
  <Environment name="solr/home" type="java.lang.String"
value="/opt/solr/example" override="true"/>

  <Environment name="solr/data/dir" type="java.lang.String"
value="/opt/solr/example/data" override="true"/>

</Context>

Re: Any way to specify the data dir in Tomcat Context file?

Posted by Chris Hostetter <ho...@fucit.org>.
: Is there some way to override the data directory in the Tomcat context file?

i don't believe so.

work was done a long time ago to support system property substitution when 
the solrconfig.xml file is loaded, but i don't think that was ever 
generalized to support JNDI values as well (which is the <Environment/> 
tags in context files set)


-Hoss