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 John Whitley <jw...@tableausoftware.com> on 2007/06/05 02:03:02 UTC

How to specify config file locations in recent nightlies?

Hi all,

Is there a way to explicitly specify the location of the solr conf
directory and/or config file locations (separate from the data dir) in
recent nightlies? 

I noted an old posting that referenced a "solr.configDir" property, but
that seems to have been removed from recent code.  FWIW, I'm running
under Tomcat.
 
Any pointers greatly appreciated..

Thanks,
John



Re: How to specify config file locations in recent nightlies?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jun 4, 2007, at 8:57 PM, Chris Hostetter wrote:

>
> : Is there a way to explicitly specify the location of the solr conf
> : directory and/or config file locations (separate from the data  
> dir) in
> : recent nightlies?
> :
> : I noted an old posting that referenced a "solr.configDir"  
> property, but
> : that seems to have been removed from recent code.  FWIW, I'm running
> : under Tomcat.
>
> I don't think there has ever been a solr.configDir property ...  
> there is
> the concept of a "Solr Home" directory which can be specified using  
> the
> "solr.solr.home" system property when starting the JVM, or by using
> JNDI, the wiki has lots more info...
>
> http://wiki.apache.org/solr/SolrInstall
> http://wiki.apache.org/solr/SolrTomcat

Also, it's possible to use system properties within the configuration  
files.  One change I make to solrconfig.xml is this:

	 <dataDir>${solr.data.dir:./solr/data}</dataDir>

This allows Solr to be started in this manner:

	java -Dsolr.solr.home=<solr home> -Dsolr.data.dir=<data dir> -jar  
start.jar

In fact, I've just committed this change to the example  
solrconfig.xml file so it'll be in there as an example from now on.

	Erik


Re: How to specify config file locations in recent nightlies?

Posted by Chris Hostetter <ho...@fucit.org>.
: Is there a way to explicitly specify the location of the solr conf
: directory and/or config file locations (separate from the data dir) in
: recent nightlies?
:
: I noted an old posting that referenced a "solr.configDir" property, but
: that seems to have been removed from recent code.  FWIW, I'm running
: under Tomcat.

I don't think there has ever been a solr.configDir property ... there is
the concept of a "Solr Home" directory which can be specified using the
"solr.solr.home" system property when starting the JVM, or by using
JNDI, the wiki has lots more info...

http://wiki.apache.org/solr/SolrInstall
http://wiki.apache.org/solr/SolrTomcat



-Hoss