I have 3 different instances of solr on jetty 6.1.13, but you need the jetty
plus.
my etc/jetty.xml looks like this

   <Call name="addLifeCycle">
     <Arg>
        <New class="org.mortbay.jetty.webapp.WebAppContext">
           <Arg><Ref id="Contexts"/></Arg>
           <Arg><SystemProperty name="jetty.home" default="."/>*
/webapps/solr1*</Arg>
           <Arg>*/solr1*</Arg>
              <Set name="ConfigurationClasses"><Ref id="plusConfig"/></Set>
              <Set name="defaultsDescriptor"><SystemProperty name="
jetty.home" default="."/>/etc/webdefault.xml</Set>
              <New id="solr_home" class="
org.mortbay.jetty.plus.naming.EnvEntry">
                 <Arg>solr/home</Arg>
                 <Arg type="java.lang.String"><SystemProperty name="
jetty.home" default="."/>override this value</Arg>
              </New>
         </New>
     </Arg>
   </Call>
   <Call name="addLifeCycle">
     <Arg>
        <New class="org.mortbay.jetty.webapp.WebAppContext">
           <Arg><Ref id="Contexts"/></Arg>
           <Arg><SystemProperty name="jetty.home" default="."/>*
/webapps/solr2*</Arg>
           <Arg>*/solr2*</Arg>
              <Set name="ConfigurationClasses"><Ref id="plusConfig"/></Set>
              <Set name="defaultsDescriptor"><SystemProperty name="
jetty.home" default="."/>/etc/webdefault.xml</Set>
              <New id="solr_home" class="
org.mortbay.jetty.plus.naming.EnvEntry">
                 <Arg>solr/home</Arg>
                 <Arg type="java.lang.String"><SystemProperty name="
jetty.home" default="."/>override this value</Arg>
              </New>
         </New>
     </Arg>
   </Call>


then, on the webapps/solr1/WEB-INF you need a jetty-env.xml like this:

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "
http://jetty.mortbay.org/configure.dtd";>

<Configure class="org.mortbay.jetty.webapp.WebAppContext">

<!-- Add an override for a global EnvEntry                           -->
<New id="solr_home" class="org.mortbay.jetty.plus.naming.EnvEntry">
 <Arg>solr/home</Arg>
 <Arg type="java.lang.String"><SystemProperty name="jetty.home"
default="."/>/solr1</Arg>
</New>

</Configure>



Hope it helps



On 6/26/07, Otis Gospodnetic <[EMAIL PROTECTED]> wrote:

Hm, that JNDI again... this makes it sound like SOLR-215 is completely
superfluous?
I have not configured Jetty this way yet, but I do see some docs on
http://wiki.apache.org/solr/SolrJetty .  Interestingly, the configs look a
lot different than what's described on
http://docs.codehaus.org/display/JETTY/JNDI .  I also remember Jetty Plus
from a while back, but now I cannot find any information about Jetty Plus
6.*, only 5 - http://jetty.mortbay.org/jetty5/plus/index.html .

Otis



----- Original Message ----
From: Chris Hostetter <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Tuesday, June 26, 2007 8:10:46 PM
Subject: Re: multiple indices


:   I have multiple applications (blogs/forums/video/etc) - each of these
: is independent (no need to perform queries on multiple indices).

:   Would it be best to use multiple instances of SOLR/JVM - one for each
: index or use a solution where only one JVM instance is running (maybe
: solr-215?)?


you don't actaully need multiple JVM instances to run multiple Solr
instance ... you can configure your ServletContainer to run the solr.war
in multiple contexts each of which has a differnet solrconfig.xml and
schema.xml (using JNDI) ... that way you get most of hte benefits of
isolated instances but also can also take advantage of a single large heap
and common connection management.




-Hoss





Reply via email to