Knowledge Base

Installing Simple Search

Last Modified:
07 Nov 2019
User Level:
Administrator

Simple Search is a separate application deployed alongside Terminalfour to enable media searching. If you are upgrading to Terminalfour 8.3.2 and above from a previous version you must install Simple Search separately. If you're hosted with us, this will be done as part of the upgrade process. If you're doing the upgrade yourself then this guide is for you. 

The Simple Search installation package is a .war file. To get this file log a support ticket with Client Services.

This document refers to $TOMCAT_HOME which is the base directory for your Apache Tomcat installation. This is system dependent and maybe something like /usr/share/tomcat9 or C:\Apache Software Foundation\Tomcat 9\. Please use the appropriate path for your system during installation. 

When you have downloaded the Simple Search .war file, follow these steps:

  1. Stop Tomcat, go to $TOMCAT_HOME/conf and open the context.xml file to edit it
  2. Locate the line:
     <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
  3. After the line paste the below code - the value should be the full path to a valid directory on your server which you need to create. Ensure the user who runs your Tomcat service has read and write access to this directory.  
    <Environment name="indexLocation" value="/opt/terminalfour/search-index" type="java.lang.String" override="false"/>
  4. Save the context.xml file
  5. Copy the WAR file generated above to a sub-directory of Tomcat's webapps directory, e.g. $TOMCAT_HOME/webapps/servlets/
  6. Go to $TOMCAT_HOME/conf and open the server.xml file
  7. Add the following lines at the bottom of the file above the </Host> tag (ensure you replace $TOMCAT_HOME with the correct path):
    <Context path="/simple-search" docBase="$TOMCAT_HOME/webapps/servlets/simple-search.war" /> 
  8. Save the file
  9. Start your Tomcat service
  10. Reviewing the Tomcat logs you should see the Simple Search application being deployed:
    Simple Search Application being deployed

  11. Go to $TOMCAT_HOME/webapps - you should see a 'simple-search' folder containing sub-directories and files
  12. Go to $TOMCAT_HOME/work/Catalina/localhost - you should see a 'simple-search' folder containing sub-directories and files
  13. Go to the url /simple-search/actuator/health (wherever you have it installed). The response should show {"status":"UP"}:Simple Search status

Simple Search in a clustered environment

If you are running Terminalfour in a clustered environment, only one instance of Simple Search is required. It may run on a separate server to TERMINALFOUR or on one of the existing Terminalfour cluster nodes. 

In your Terminalfour database, update the path to the search service. 

The value is stored in the config_option table and may be updated as follows:

UPDATE config_option SET config_value = 'http://10.0.0.123:8080/simple-search' WHERE config_key = 'simpleSearch.baseUrl';

In this example we've used http://10.0.0.123:8080/simple-search as the host and port for the service but please change this to match your setup.

Back to top