Automating WebSphere Commerce Search replication configuration (with or without the repeater)

You can automate updating your replication configuration for your search index data on both your master and subordinate servers to help improve reliability, fault-tolerance, and performance. Replicating WebSphere Commerce Search maintains your search index data in more than one location, and involves copying designated changes for one location to another and synchronizing the data in both locations.

The repeater is used in the following scenarios:
  • The repeater is required for replication when you make emergency fixes or when indexing inventory from the production database.
  • The repeater is not required (but is recommended) for replication when managed content is indexed from the Quality Assurance or Staging database.
Important: The repeater must reside in Production, as it relies on the production database to perform emergency updates.

Before you begin

Ensure that you update the replication configuration XML file, or created a new one, to match your WebSphere Commerce Search server information. The default template file is at:
  • solrhome/replication-config.xml.

The replication-config.xml file includes the following usage:
  • The search index server configuration is defined in the file, and then passed into the configSearchReplication utility for automatic configuration.
  • The same replication configuration XML file can be used on master, subordinate, and repeater search servers.
  • The information in the file includes the server name, port number, and core names. Define all search server-related information in the file according to the default template.
  • The default file contains repeater configuration information. The repeater configuration includes information for the master and subordinate servers. If you do not use the repeater, remove the sample repeater configuration information that is contained in the file.
It contains sample configurations for the following sections by default:
Master configuration
Contains configuration information for the master server.
Complete this section, even for the replication configuration XML files that exist on subordinate servers.
Sample configurations within the file:

<server isMaster="true">
<name>server0.ibm.com</name>
<port>3737</port>
<cores>
<core name="MC_10001_CatalogEntry_en_US"/>
<core name="MC_10001_CatalogEntry_Unstructured_en_US"/>
<core name="MC_10001_CatalogGroup_en_US"/>
</cores>
<confFiles>schema.xml,stopwords.txt,synonyms.txt</confFiles>
</server>
Subordinate configuration
Contains configuration information for the subordinate servers.
Sample configurations within the file:

<server isMaster="false">
<name>server1.ibm.com</name>
<port>3737</port>
<pollInterval>00:00:60</pollInterval>
</server>
Repeater configuration
Contains configuration information for the master and subordinate servers.
Sample configurations within the file:

<server isMaster="true">
<name>server2.ibm.com</name>
<port>3737</port>
<cores>
<core name="MC_10001_CatalogEntry_en_US"/>
<core name="MC_10001_CatalogEntry_Unstructured_en_US"/>
<core name="MC_10001_CatalogGroup_en_US"/>
</cores>
<confFiles>schema.xml,stopwords.txt,synonyms.txt</confFiles>
</server>

<server isMaster="false">
<name>server2.ibm.com</name>
<port>3737</port>
<!-- <pollInterval>00:00:60</pollInterval> -->
</server>
Download a sample version of the replication-config.xml file: replication-config.zip.

Procedure

  1. Complete one of the following tasks:
    • LinuxAIXLog on as a WebSphere Commerce non-root user.
    • For IBM i OS operating systemLog on with a user profile that has *SECOFR authority.
    • WindowsLog on with a user ID that is a member of the Windows Administration group.
  2. Go to the following directory:
    • WC_installdir/components/foundation/subcomponents/search/bin
    • WebSphere Commerce DeveloperWCDE_installdir\components\foundation\subcomponents\search\bin
  3. Run the configSearchReplication utility:
    • Windows configSearchReplication.bat -instance instance_name -searchServerName searchServerName -solrhome solrhome [-replicationConfig xml_file_path] [-wasHome wasHome]
    • LinuxAIXFor IBM i OS operating system configSearchReplication.sh -instance instance_name -searchServerName searchServerName -solrhome solrhome [-replicationConfig xml_file_path] [-wasHome wasHome]
    • WebSphere Commerce DeveloperDB2OracleconfigSearchReplication.bat -searchServerName searchServerName [-replicationConfig xml_file_path]
    Where:
    searchServerName
    The search server host name that will be used as a selector for the <server><name> element in the replication-config.xml file.
    replicationConfig
    The XML file that contains the search server information.
    If the file path is not specified, the default solrhome/replication-config.xml file is used.
    solrhome
    The location of the Solr home directory path that contains the index data of Solr. The value must be an absolute path.
    This parameter is needed when you run the utility on a subordinate server that does not contain a WebSphere Commerce instance. In order to ensure that the master and subordinate machines all contain the search index data, and will work together as a cluster, copy the solrhome directory from your master machine to all the search nodes.
    If not specified, the utility fails since the solrconfig.xml will not be found.
    wasHome
    Optional: The installation path for WebSphere Application Server.
    This parameter is needed when you run the utility on a subordinate server that does not contain a WebSphere Commerce instance.
    If not specified, the default Java system directory is used to run the utility.
  4. Ensure that the utility runs successfully.
    To get more logging information, update the logging level from INFO to FINEST in the WC_eardir\components\foundation\subcomponents\search\config\configure-solr-replication-logging.properties file:
    
    com.ibm.commerce.level=FINEST