configSearchReplication utility

Use the configSearchReplication utility to replicate your search index data on both your source and target 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.

Syntax diagram for configSearchReplication utility

Before you begin, ensure that you have an updated replication-config.xml file:

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.

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.

Parameter values

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.

Example

From the following directory:
  • WC_installdir/components/foundation/subcomponents/search/bin
  • WebSphere Commerce DeveloperWCDE_installdir\components\foundation\subcomponents\search\bin
Run the following command:
  • 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]