lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SolrJetty" by Tom Nguyen
Date Tue, 17 Apr 2012 04:40:31 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SolrJetty" page has been changed by Tom Nguyen:
http://wiki.apache.org/solr/SolrJetty?action=diff&rev1=29&rev2=30

   * How to specify solr.home for particular context inside context configuration.
  
  == Logging ==
- By default Solr producing huge log output. Solr uses JDK log functionality. You can control
the amount of logging output in Solr by using the Admin Web interface. Select the LOGGING
link. Note that this page only lets you change settings in the running system and is not saved
for the next run.
+ By default Solr producing huge log output. Solr uses JDK log functionality. You can control
the amount of logging output in Solr by using the Admin Web interface. Select the LOGGING
link. Note that this page only lets you change settings in the running system and is not saved
for the next run. To setup default Log level we have to create file with logging properties
logging.properties.
- To setup default Log level we have to create file with logging properties logging.properties.
  
  {{{
  org.apache.solr.level = WARNING
@@ -174, +173 @@

  java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
  java.util.logging.FileHandler.pattern = /var/log/jetty6/solr-%u.log
  }}}
- 
  and add it into Jetty java options (/etc/default/jetty):
+ 
  {{{
  JAVA_OPTIONS="-Djava.util.logging.config.file=etc/logging.properties $JAVA_OPTIONS"
  }}}
@@ -188, +187 @@

  
  === logrotating ===
  TODO.
- 
  
  == Other information ==
  === Configuring Solr Home with JNDI (Jetty < 6.0) (Deprecated) ===
@@ -218, +216 @@

  
   * Specify "`ContextDeployer`" in `jetty.xml`
   * For each web app, add a `.xml` file in "`./contexts`"
+ 
    * Set `ConfigurationClasses` to activate JNDI. (must be done separately for each webapp)
    * Set `overrideDescriptor` to define an [[http://docs.codehaus.org/display/JETTY/override+web.xml|override
web.xml file]]
    * In the `overrideDescriptor` file, set an `<env-entry>` for "`solr/home`"
@@ -266, +265 @@

  === Long HTTP GET Query URLs ===
  If you're issuing very long HTTP GET queries to Solr, you may need to adjust the headerBufferSize
parameter for your connector in jetty.xml. (See http://docs.codehaus.org/display/JETTY/Configuring+Connectors)
The default for this parameter is 4K. If your buffer size is too small, the symptom client-side
won't be an error message but rather having your HTTP connection closed without an HTTP response.
  
+ '''JETTY 8'''
+ 
+ None of these work in Jetty 8. I have to spend sometimes to figure it out for Jetty 8. Here
is the config.
+  1. Download Jetty 8, unzip it, you will find the contexts dir, create new config file solr.xml
[solr.home]/contexts/solr.xml
+ 
+  <?xml version="1.0"  encoding="ISO-8859-1"?>
+  <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
+ 
+  <!-- ==================================================================
+  Configure and deploy the test web application in $(jetty.home)/webapps/test
+ 
+  Note. If this file did not exist or used a context path other that /test
+  then the default configuration of jetty.xml would discover the test
+  webapplication with a WebAppDeployer.  By specifying a context in this
+  directory, additional configuration may be specified and hot deployments
+  detected.
+  ===================================================================== -->
+ 
+  <Configure class="org.eclipse.jetty.webapp.WebAppContext">
+ 
+ 
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <!-- Required minimal context configuration :                        -->
+    <!--  + contextPath                                                  -->
+    <!--  + war OR resourceBase                                          -->
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <Set name="contextPath">/solr</Set>
+    <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/solr.war</Set>
+ 
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <!-- Optional context configuration                                  -->
+    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+    <Set name="extractWAR">true</Set>
+    <Set name="copyWebDir">false</Set>
+    <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
+ 
+    <New class="org.eclipse.jetty.plus.jndi.EnvEntry">
+      <Arg>/solr/home</Arg>
+      <Arg type="java.lang.String"><SystemProperty name="jetty.home" default="."/>/webapps/solr/</Arg>
+      <Arg type="java.lang.Boolean">true</Arg>
+    </New>
+ 
+  </Configure>
+ 
+  2. Copy solr.war to [jetty.home]/webapps. Manually unzip it there, you will have [jetty.home]/webapps/solr.
Copy the conf folder (from the example folder that you download solr) to [jetty.home]/webapps/solr.
Change all the config that you need in schema.xml and solrconfig.xml
+ 
+  3. under [jetty.home], start jetty java -jar start.jar OPTIONS=plus
+ 

Mime
View raw message