About the free-text batch load command

On Windows, ensure that a Unix-compatible sort binary that performs character-value sorting is available. Guidewire supports cygwin on Windows.

Note: Do not set up and configure the free-text batch load command if you configure free-text search for embedded operation. Instead, use the Free-text Search page from the Internal Tools tab.

Free-text search configuration files

Guidewire stores the configuration files that you modify during setup, including the batch load command itself, in the following directory:
  • /opt/gwsolr/pc/solr/policy_active/conf
If you created additional index document types, you need to modify the configuration files and the batch load command, in the following directory for each document type:
  • /opt/gwsolr/pc/solr/documenttype_active/conf

Guidewire locates most of the setup information for the free-text batch load command in a configuration file for your database brand. The configuration file name has the following format:

batchload-config-databaseBrand.xml

Free-text search configuration parameters

The following list describes the configuration parameters that you may need to modify in the batchload-config file:

Configuration parameter

Description

absolutePathToPostprocessorExe

Locates the postprocess shell script of batch file that the batch load command calls after extracting data from the PolicyCenter relational database. You must modify this parameter if your Guidewire Solr home directory is other than /opt/gwsolr.

absolutePathToSortExe

Location of a sort binary. You must modify this parameter if you use a binary other than /bin/sort on Unix or c:\cygwin\bin\sort.exe on Windows.

absolutePathToSortTmpDir

Location of a working directory into which the sort binary writes its intermediate files. This directory may be the same as, or different from, the directory specified by absolutePathToWorkDir.

absolutePathToWorkDir

Location of a working directory, possibly on a remote host, for collating and compiling large volumes of index documents for the full-text search engine. Generally in a production environment, you modify this parameter. Otherwise, the working directory is within the Guidewire Solr home directory. Ensure the directory that you specify has sufficient high-performance disk space.

If you change this value, you must make a matching change to data-config.xml.

dataSource

Connection information for the PolicyCenter relational database. You must modify this parameter to specify the network location of the database and the username and password.

documentRoot Highest directory where documents for Guidewire Solr Extension are stored. The default value for this parameter is ${solrRoot}/pc/solr/policy_active.
solrRoot Highest directory where Guidewire Solr Extension files are stored. The directory is where you extract the Guidewire Solr Extension .zip installation file. The default value for this parameter is /opt/gwsolr.

solrServerConfigFile

Locates the configuration file that controls how the free-text feature in PolicyCenter operates and interacts with the Guidewire Solr Extension. You must modify this parameter if your Guidewire Solr Extension home directory is other than /opt/gwsolr.

xsi:noNamespaceSchemaLocation

Location of the XSD for batch load configuration files. You must modify this parameter if your Guidewire Solr home directory is other than /opt/gwsolr.

For Windows paths, you can use the forward slash (/) character as the path separator. If your Guidewire Solr home directory is on a different Windows drive than your PolicyCenter installation directory, you must specify the drive letter as well.

Note: You can substitute the parameters in the preceding table from a property file or an environment variable.

See also

Configure the free-text batch load command for PolicyCenter

Procedure

  1. Navigate to the following Guidewire Solr configuration directory:
    • /opt/gwsolr/pc/solr/policy_active/conf
  2. Open the batchload shell script or batch file for editing and perform the following steps:
    1. If using a directory for the Guidewire Solr home directory other than /opt/gwsolr, modify the BASE_DIR environment variable to locate the configuration files.
      For example:
      Unix
      BASE_DIR=/opt/gwsolr
      Windows
      set BASE_DIR=C:\opt\gwsolr
    2. Modify the CONFIGFILE environment variable to locate the appropriate batch load configuration file for your database brand.
      For example, if your database brand is Oracle:
      Unix
      CONFIGFILE=$GWSOLR_HOME/solr/$DOC_TYPE_active/conf/batchload-config-oracle.xml
      Windows
      set CONFIGFILE=%GWSOLR_HOME%\solr\%DOC_TYPE%_active\conf\batchload-config-oracle.xml
  3. Open the batch load configuration file for which you specified a location in the previous step and perform the following steps:
    1. Review the following elements for possible changes.
      Unix
      <param name="solrRoot" value="/opt/gwsolr"/>
      <param name="absolutePathToSortExe" value="/bin/sort"/>
      Windows
      <param name="solrRoot" value="c:\opt\gwsolr"/>
      <param name="absolutePathToSortExe" value="c:\cygwin\bin\sort.exe"/>
    2. Modify the attributes of the <dataSource> element to match the values for your database.
      For example, if your database brand is Oracle:
      <dataSource name="ds_orcl" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin://@grinch:11201:gwDiaAsc" user="su" password="gw"/>
      Important: Due to security concerns, Guidewire recommends that you configure Guidewire Solr Extension database credentials to come from a property file or from environment variables. Do not hard code the database credentials in step 3b. Also due to security concerns, Guidewire recommends that if you use a property file for the database credentials, you do not place that file in either C:\opt\gwsolr\pc\solr\policy_active\conf or C:\opt\gwsolr\pc\solr\policy_active. Instead, place the property file in a folder adjacent to C:\opt\gwsolr\pc\solr\policy_active\conf.
  4. On Windows, edit postprocess.bat and, if necessary, modify the CoreUtils environment variable to locate the sort binary.
    For example:
    set CoreUtils C:\cygwin
  5. Restart the Solr application to pick up the changes.
  6. Run the batchload command to test the setup.
  7. Examine the status response to verify your setup.
    A problem-free load gives the same positive counts for Total Rows Fetched and Total Documents Processed.

What to do next

After completing this procedure, proceed to Enabling free-text search in PolicyCenter.