Configure free-text search for Tomcat

Before you begin

PolicyCenter free-text search requires that you set up an instance of Tomcat separate from the instance that runs your PolicyCenter application. In a production environment, the separate instances of Tomcat must run on separate computers.

Procedure

  1. On the host on which the Tomcat instance for free-text search resides, create an installation directory to use as the Guidewire Solr home directory. For example:
    • Unix – /opt/gwsolr/pc
    • Windows – C:\opt\gwsolr\pc

    This topic uses /opt/gwsolr/pc as the Guidewire Solr home directory name.

  2. Extract file /solr/pc-gwsolr.zip on the PolicyCenter host into the folder you created on the Tomcat host.
  3. Perform the listed steps if either the following are true:
    • You extracted pc-gwsolr.zip to a directory other than /opt/gwsolr/pc in the previous step.
    • You are using the Microsoft Windows operating system.
    1. From the directory on which you installed the Guidewire Solr Extension, open the following file for editing:
      • pc-gwsolr/WEB-INF/web.xml
    2. Change the value of the <env-entry-value> entry in the following code to match the directory on which you installed the Guidewire Solr Extension. If you are using the Microsoft Windows operating system, change the value to a Windows path, including the drive designator:
      <env-entry>
        <env-entry-name>solr/home</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
       <env-entry-value>C:\opt\gwsolr\pc\solr</env-entry-value>
      </env-entry>
    3. Open the following file for editing:
      • GWSOLR_HOME/pc/pc-gwsolr.xml
    4. Change the value for the docBase attribute to match the directory on which you installed the Guidewire Solr Extension. If you are using Windows, include the drive designator.
      <Context docBase="C:\opt\gwsolr\pc\pc-gwsolr" debug="0" crossContext="true">
    5. Save your changes.
  4. Copy the file c:\opt\gwsolr\pc\pc-gwsolr.xml to the directory TOMCAT_HOME/conf/Catalina/localhost.
    Note: If the Catalina/localhost directory does not exist, you must create it.
  5. Change the HTTP port number for Tomcat:
    1. Edit the following file:
      • TOMCAT_HOME/conf/server.xml
    2. Change the port property for the HTTP port value to 8983, as the following example shows.
      <Connector port="8983" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

      The standard port for the Guidewire Solr Extension is 8983.

    3. Save your changes.
  6. Copy the following logging files from \opt\gwsolr\pc\logging_jars to TOMCAT_HOME\lib:
    Important: Copy only the specified logging files.

    File name

    Description

    jcl-over-slf4j-1.7.12.jar

    Jakarta commons logging over SLF4J

    log4j.properties

    Log4j properties

    log4j-over-slf4j-1.7.12.jar

    Log4j over SLF4J

    slf4j-api-1.7.12.jar

    SLF4J API

    slf4j-ext-1.7.12.jar

    SLF4J Extensions

    slf4j-jdk14-1.7.12.jar

    SLF4J to Java Logging

  7. Start Tomcat by performing one of the following from the TOMCAT_HOME/bin directory:
    • If you want Tomcat to operate standard fashion, run the following command.
      • startup
    • If you want to access the Guidewire Solr Extension with a remote debugger, run the following command.
      • catalina jpda start

    As a result, you can connect a remote debugging session through port 8000.

  8. Examine the log file TOMCAT_HOME/logs/catalina to ensure the Guidewire Solr Extension web application started successfully.

    The application started successfully if you see a number of log entries related to pc-gwsolr.

  9. In a browser, open the administrative user interface for the Guidewire Solr Extension web application by entering the following URL:
    http://hostName:8983/pc-gwsolr
  10. Verify that you see links to administrative pages for each entity type that is searchable in PolicyCenter with free-text search.

    For example, click Core Admin to see information for the pc_policy_active core.

What to do next

After completing this procedure, proceed to About the free-text batch load command.