lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Singh <jacobsi...@gmail.com>
Subject Re: What is the variable in sfconfig.xml for solr home
Date Fri, 08 Aug 2008 17:27:02 GMT
Hi SHalin,

I'm using JNDI and to set the solr home via an override like so:

  <env-entry>
    <env-entry-name>solr/home</env-entry-name>
    <env-entry-value>path/to/solr/home</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
  </env-entry>


This works like a charm, and I have 20 instances which all link to the
same conf/ folder which has the solrconfig.xml

It's just that I don't think I need 20 solrconfig.xml files since they
are all identical except the section in question below.

Best,
Jacob

Shalin Shekhar Mangar wrote:
> Not sure why you are passing the args. If you are using the standard
> directory structure, it may not be needed.
> 
> Try removing the args and env sections and see. It works great for me that
> way.
> 
> On Fri, Aug 8, 2008 at 12:57 PM, Jacob Singh <jacobsingh@gmail.com> wrote:
> 
>> Hi Shanlin,
>>
>> Thanks for your reply.
>>
>> I tried the following:
>> <listener event="postCommit" class="solr.RunExecutableListener">
>>      <str name="exe">/opt/solr/bin/snapshooter</str>
>>      <str name="dir">/opt/solr/bin</str>
>>      <bool name="wait">true</bool>
>>      <arr name="args"> <str>-d ${solr.solr.home:.}/data </str>
</arr>
>>      <arr name="env"> <str>MYVAR=val1</str> </arr>
>>
>> in my solrconfig.xml
>>
>> but I always get the default (.).  I am using overrides through JNDI to
>> set solr/home and this works fine for everything, but it seems the
>> variable is not set here....  I'm testing it by putting a logging call
>> of $* in snapshooter, and it always receives -d ./data
>>
>> Do you have any idea what could be causing it?
>>
>> Best,
>> Jacob
>>
>> Shalin Shekhar Mangar wrote:
>>> You can set solr home by passing -Dsolr.solr.home=/path/to/solr/home when
>>> running your container (the double solr is *not* a typo)
>>>
>>> You can also use JNDI to configure it. Look under the "Installation and
>>> Configuration" section in the wiki for container-specific instructions:
>>> http://wiki.apache.org/solr/
>>>
>>> On Fri, Aug 8, 2008 at 6:26 AM, Jacob Singh <jacobsingh@gmail.com>
>> wrote:
>>>> I see in the docs:
>>>>
>>>> System property substitution
>>>>
>>>> Solr supports system property substitution, allowing the launching JVM
>>>> to specify string substitutions within either of Solr's configuration
>>>> files. The syntax ${property[:default value]}. Substitutions are valid
>>>> in any element or attribute text. Here's an example of allowing the
>>>> runtime to dictate the data directory:
>>>>
>>>>   <dataDir>${solr.data.dir:./solr/data}</dataDir>
>>>>
>>>>
>>>> So what is the property for solr home?  I've tried solr.home,
>>>> solr.solr/home (from JNDI), solr.solrhome...
>>>>
>>>> Thanks,
>>>> Jacob
>>>>
>>>> P.S. is there a list of properties available somewhere?
>>>>
>>>>
>>>
>>
> 
> 


Mime
View raw message