Configuring the search function of the Business console

You can set up the search function in the Decision Center Business console to work with a remote instance of the Apache Solr search engine.

About this task

By default, the search function in the Business console uses an embedded instance of the Apache Solr search engine. Alternatively, you can have the search function work with a remote instance of the search engine, which you can run on another computer, or the same computer but in a dedicated web application.

You can set three parameters for the search engine:
Table 1. Search parameters
Property Description
SearchProvider
This parameter takes one of the following values:
  • SolrEmbedded: Use this value to select the embedded Solr search engine.
  • SolrRemote: Use this value to select a remote instance of the Solr search engine.
SolrEmbeddedDataDir Use this optional parameter to direct the index of the embedded version (SolrEmbedded) to a specific directory on Decision Center.
SolrRemoteUrl Use this parameter with SolrRemote to provide the URL of the remote Solr search engine.

You set the configuration parameters for the search engine in the preferences.properties file for Decision Center. The preferences.properties file can be placed in any package, and the names of the search properties depend on the location of the file, for example with SearchProvider:

  • If you place the preferences.properties file in .../rules/decisioncenter/web/search/, the name of the property must be SearchProvider.
  • If you place the preferences.properties file in .../rules/decisioncenter/web/, the name of the property must be search.SearchProvider.

See also IlrPropertyManager.

The following table provides examples for setting the parameters in preferences.properties to work with the Solr search engine:
Table 2. Configuration table for search properties
Solr server Parameter settings

External server

The URL of the external server depends on the installation. For this example, the remote address of the search engine is http://mysearchserver:8983/solr.

Set the preferences.properties file as follows:

SearchProvider=SolrRemote
SolrRemoteUrl=http://mysearchserver:8983/solr

Embedded server

In this example, you store the index in the c:/temp/DC-SearchIndex directory on your computer.

Set the preferences.properties file as follows:

SearchProvider=SolrEmbedded
SolrEmbeddedDataDir=c:/temp/DC-SearchIndex

If you do not specify a directory for SolrEmbeddedDataDir, Decision Center stores the search index in a temporary directory that uses the system property denoted by java.io.tmpdir plus decisioncenter-solr-dir, for example: <temp_dir>/decisioncenter-solr-dir/.

If you specify a directory for SolrEmbeddedDataDir, the directory and its content persist across server restarts, and the server does not re-index the repository with each restart.

Procedure

To configure the search function to run with a remote instance of the Solr search engine:

  1. Install the Apache Solr search engine on another computer, or as part of a dedicated web application on your computer.

    For information on installing the Solr server, visit the Apache Solr website.

  2. Locate the decisioncenter-solr-home.zip file in <InstallDir>/teamserver.
  3. Decompress the file in a directory in the remote instance of the Solr server.
  4. Configure the home directory of the remote Solr server to use the location of the decompressed configuration files.
  5. Configure the Decision Center preferences.properties file to point to the URL of the Solr server.

To disable the search function and indexing:

  1. Optional: If you need to disable the search function, open the file dispatcher-servlet.xml located in decisioncenter.war/WEB-INF/spring, and uncomment the following line:
    <context:exclude-filter type=“regex” expression=“com\.ibm\.rules\.decisioncenter\.web\.search\..*“/>