Skip to content

Updating Solr on jboss 5

douglm edited this page Aug 15, 2013 · 6 revisions

Introduction

Solr is installed on jboss 5 as a ear wrapping the slightly modified war. The solr configuration is stored in the solr home which is in the jboss data directory.

Updating

  1. Copy a preexisting ear and name it appropriately, e.g. solr-4.4.0.ear.
  2. Edit the META-INF/application.xml and set the war name
  3. Rename the contained war
  4. Replace the war with the unzipped version of the solr distributed webapp found in /solr-4.4.0/dist/.
  5. For the moment comment out the web-app element in the web.xml and replace it with . This avoids some schema related issues.
  6. The setting for the solr home needs to be at the end of the web.xml file, after the welcome-file:
      <!-- People who want to hardcode their "Solr Home" directly into the
           WAR File can set the JNDI property here...
       -->
        <env-entry>
           <env-entry-name>solr/home</env-entry-name>
           <env-entry-value>${jboss.server.data.dir}/solr</env-entry-value>
           <env-entry-type>java.lang.String</env-entry-type>
        </env-entry>
  1. Rename the data/solr directory to data/solr-
  2. Update the schema and config files in the bedework repository. They get copied in to data/solr with the deploySolr target
  3. Create a new data/solr and copy all the config and folders. Appears to need contrib and (most of) dist
  4. Create a data/solr/bwpublic based on the distributed /solr-4.4.0/example/solr/collection1/conf/
  5. Ditto for data/solr/bwuser
  6. In each create a data directory - data/solr/bwpublic/data, data/solr/bwuser/data
  7. execute the deploySolr target
  8. solrconfig.xml needs a number of changes detailed below.
  9. schema.xml is changed to define bedework fields.

solrconfig.xml changes

  1. Change paths to jar files - mostly ../../../contrib to ../contrib - also for dist
  2. set default auto soft commit to 1000