Maybe I'm confused.  Can't you use the brand-spanking new MultiCore stuff for 
this, or JNDI, as I just mentioned in the "Re: Solr, Multiple processes 
running" thread?

Otis 
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch

----- Original Message ----
From: patrick o'leary <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Tuesday, December 11, 2007 2:18:58 PM
Subject: Re: Two Solr Webapps, one folder for the index data?




  
  

JVM properties restrict you to a single implementation within a jvm.



For instance if you want multiple instances of solr running with the
same schema, with different data

dir's in the one app server. You'll have to have several copies of
solrconfig and schema.xml.



By using context environment, I can have multiple contexts like



pjaol:~/tmp/locallucene/solr/tomcat-conf pjaol$ more solr.xml 

<Context docBase="/Users/pjaol/tmp/locallucene/solr/solr.war"
debug="0" crossContext="true" allowLinking="true">

   <Environment name="solr/home" type="java.lang.String"
value="/Users/pjaol/tmp/locallucene/solr" override="true" />

   <Environment name="solr/data/dir" type="java.lang.String"
value="/Users/pjaol/tmp/locallucene/solr/partitions/data"
override="true"/>

</Context>



pjaol:~/tmp/locallucene/solr/tomcat-conf pjaol$ more solr1.xml 

<Context docBase="/Users/pjaol/tmp/locallucene/solr/solr.war"
debug="0" crossContext="true" allowLinking="true" >

   <Environment name="solr/home" type="java.lang.String"
value="/Users/pjaol/tmp/locallucene/solr" override="true" />

   <Environment name="solr/data/dir" type="java.lang.String"
value="/Users/pjaol/tmp/locallucene/solr/partitions/data1"
override="true"/>

</Context>



Changing just the solr/data/dir for each instance.



And in my solrconfig.xml

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



It certainly makes development & operations easier.



P



Mike Klaas wrote:
I use jvm system properties for this; they seem to work
well.
  

  

-Mike
  

  

On 11-Dec-07, at 7:39 AM, patrick o'leary wrote:
  

  

  I actually have a patch for solr config
parser which allows you to use context environment variables in the
solrconfig.xml
    

I generally use it for development when I'm working with multiple
instances and different data dirs.  I'll add it to jira today if you
want it.
    

    

P
    

    

Jörg Kiegeland wrote:
    

    I have successfully configured two
parallel  Solr webapps , however I see that all data gets stored in one
folder of my Tomcat installation, namely C:\Tomcat\solr\data\index.
      

      

How can I configure that each Solr webapp shall store the data in the
folders I assigned at  <Environment
value="individualSolrFolder">, where already the Solr scheme etc.
resides (so that it get stored at individualSolrFolder/data/index)?
      

      

Thanks
      

      

    
    

-- 

Patrick O'Leary You see, wire telegraph is a kind of a very, very long
cat. You pull his tail in New York and his head is meowing in Los
Angeles. Do you understand this? And radio operates exactly the same
way: you send signals here, they receive them there. The only
difference is that there is no cat. - Albert Einstein
    

<btn_in_20x15.gif>
    

View Patrick O Leary's profile
    

  
  




-- 

Patrick O'Leary

You see, wire telegraph is a kind of a very, very long cat. You pull his tail 
in New York and his head is meowing in Los Angeles.
 Do you understand this? 
And radio operates exactly the same way: you send signals here, they receive 
them there. The only difference is that there is no cat.
  - Albert Einstein

View
Patrick O Leary's profile





Reply via email to