Search Engine in Separate Container

The following illustration shows a single-host installation where solr is running in a separate webapp container:

graphics/solr-indexer-single-host-separate-tomcat.png

To do this you would need to:

  1. Install a second Tomcat instance on your host. Make sure you set it up to listen on another port than your main Tomcat instance.

  2. Remove the solr and indexer web applications supplied with the Content Engine from your original Tomcat instance.

  3. Deploy the solr and indexer web applications supplied with the Content Engine on the new Tomcat instance.

  4. On your assembly host you will find a folder called /opt/escenic/engine/contrib/rmi-hub/lib. Deploy the JAR files you find in this folder by copying them to a suitable location on the new Tomcat instance's classpath.

    You will also have a folder called /opt/escenic/engine/lib. Copy commons-logging-1.1.1.jar to the same location.

  5. You should also find a folder called /opt/escenic/engine/contrib/rmi-hub/config/com on your assembly host. Deploy the configuration layer in this folder by copying it to a suitable location on the new Tomcat instance's classpath.

  6. Add the following Environment elements to your new Tomcat instance's context.xml configuration file:

    <Environment name="escenic/indexer-webservice" 
                 value="http://localhost:8080/indexer-webservice/index/"
                 type="java.lang.String" override="false"/>
    <Environment name="escenic/index-update-uri"
                 value="http://localhost:8081/solr/update/"
                 type="java.lang.String" override="false"/>
    <Environment name="escenic/solr-base-uri"
                 value="http://localhost:8081/solr/"
                 type="java.lang.String" override="false"/>
    <Environment name="escenic/head-tail-storage-file" 
                 value="/opt/escenic/indexer/head-tail.index"
                 type="java.lang.String" override="false"/>
    <Environment name="escenic/failing-documents-storage-file" 
                 value="/opt/escenic/indexer/failures.index"
                 type="java.lang.String" override="false"/>

    This sets up the indexer web application to use the indexer web service on the original Tomcat instance (port 8080 in this example) and the solr installation on the new Tomcat instance (port 8081 in this example).

  7. Modify your Content Engine configuration to use the new solr installation. To do this you need to edit configuration-layer-root/com/escenic/webservice/search/DelegatingSearchEngine.properties and set the solrURI property as follows:

    solrURI=http://pub1.example.com:8081/solr/select

    (assuming your new Tomcat instance is listening on port 8081).

Isolating solr in this way would ensure that it does not have too severe an effect on the operation of the Content Engine. Ultimately, of course, performance is limited by the hardware the installation is running on, but separating solr from the Content Engine in this way will avoid a major cause of unnecessary performance degradation. If solr activity still causes performance problems, then you should consider moving solr to a different host as described in Search Engine on Separate Host.