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 Nathan Woodhull <wo...@gmail.com> on 2007/04/10 18:14:01 UTC

SOLR with Jetty 6.1.1

Solr-ites,

I posted this question to the Jetty list, but I figured I would post
it here as well since it is an issue with the Solr documentation as
well.

Here at ActBlue.com I have been working on integrating Solr with our
rails application in order to provide a faceted search interface to
our directory of  candidates for elected office. Currently the
directory is implemented with SQL - we explored postgres tsearch but
decided to go with solr for a variety of reasons (I had used it
before, faceted browsing would be a pain to implement from scratch).

Since our platform is rebranded and used for other community
fundraising sites we need to run multiple instances of Solr within our
environment. I installed Jetty 6.1.1 and created an xml file for each
instance in the jetty contexts directory.

Unfortunately, the syntax for specifying JNDI resources seems to have
changed since the Solr docs were written. I tried the following XML,
but it does not seem to be working. The app starts up fine, but the
JNDI solr/home resource does not seem to get loaded.

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
 <Call class="org.mortbay.log.Log" name="debug"><Arg>Loading ActBlue
solr configuration.</Arg></Call>
 <!-- see http://wiki.apache.org/solr/SolrInstall for more information -->
 <Set name="contextPath">/test</Set>
 <Set name="war"><SystemProperty name="jetty.home"
default="."/>/solr/shared-solr.war</Set>

 <New id="solrHome" class="org.mortbay.jetty.plus.naming.EnvEntry">
   <Arg>solr/home</Arg>
   <Arg type="java.lang.String"><SystemProperty name="jetty.home"
default="."/>/solr/actblue/entities</Arg>
   <Arg type="boolean">false</Arg>
 </New>
</Configure>


Do any of you know the new Jetty syntax required to declare the JNDI
environment entry properly?

Thanks,

Nathan


--
Nathan Woodhull
blog: http://techfordemocracy.com/
aim: nathanwoodhull
cell: 518-207-6768

Re: SOLR with Jetty 6.1.1

Posted by drigolin <dr...@e-portaltech.it>.
I'm using with success Jetty 6.1.1 and solr.
What I did was starting jetty with:
java  -server  -jar start.jar etc/solr-jetty.xml

and putting inside etc/solr-jetty.xml the JNDI activation to use a single
jetty with multiple solr databases
named plus-config:

 <!-- =========================================================== -->
    <!-- Configurations for WebAppContexts                           -->
    <!-- Sequence of configurations to be applied to a webapp.       -->
    <!-- =========================================================== -->
    <Array id="plusConfig" type="java.lang.String">
      <Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item>
      <Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item>
      <Item>org.mortbay.jetty.plus.webapp.Configuration</Item>
      <Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item>
      <Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item>
    </Array>

then I have into webapps-plus/ folder many .war with different names one for
every solr database.
Inside the war I have added the env variable into WEB-INF/web.xml to have
every database to a specific home where schema e config file are present.


-- 
View this message in context: http://www.nabble.com/SOLR-with-Jetty-6.1.1-tf3553971.html#a9964936
Sent from the Solr - User mailing list archive at Nabble.com.