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 "Burton-West, Tom" <tb...@umich.edu> on 2010/12/13 20:28:19 UTC

access to environment variables in solrconfig.xml and/or schema.xml?

I see variables used to access java system properties in solrconfig.xml and schema.xml:

http://wiki.apache.org/solr/SolrConfigXml#System_property_substitution
<dataDir>${solr.data.dir:}</dataDir>
or
${solr.abortOnConfigurationError:true}

Is there a way to access environment variables or does everything have to be stuffed into a java system property?

Tom Burton-West




Re: access to environment variables in solrconfig.xml and/or schema.xml?

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(10/12/14 4:28), Burton-West, Tom wrote:
> I see variables used to access java system properties in solrconfig.xml and schema.xml:
>
> http://wiki.apache.org/solr/SolrConfigXml#System_property_substitution
> <dataDir>${solr.data.dir:}</dataDir>
> or
> ${solr.abortOnConfigurationError:true}
>
> Is there a way to access environment variables or does everything have to be stuffed into a java system property?

Tom,

No, there is no way to access environment variables. But you can
access your environment variable through a java system property
if you assign the environment variable to a java system property
when you launch JVM:

$ java -Djava.system.property1=$ENVIRONMENT_VAR1 ¥
-Djava.system.property2=$ENVIRONMENT_VAR2 -jar start.jar

Koji
-- 
http://www.rondhuit.com/en/