migrateSolrSearch utility

The migrateSolrSearch utility enables you to migrate the existing search cores and configuration files to the latest version of WebSphere Commerce Search.

Syntax diagram for migrateSolrSearch utility

Parameter values

Note: The parameters might vary, depending on your environment. See Migrating WebSphere Commerce Search for environment-specific tasks.
instance_name
The name of the WebSphere Commerce instance with which you are working (for example, demo).
masterCatalogId
The ID of the master catalog (for example, 10101).
If you do not know the master catalog ID, run the following SQL:

SQL: select * from catalog where IDENTIFIER='STORE_IDENTIFIER'
Important: If you have multiple master catalog IDs, for example, 10001 and 10002, you must migrate all of them separately. That is, if you migrate only 10001, but do not migrate 10002, Solr configuration errors occur when you build the search index.
dbuser

DB2The name of the user that is connecting to the database.

OracleThe user ID connecting to the database.

dbuserpwd
The password for the user that is connecting to the database.
solrhome
The location of the Solr home directory path that contains the index data of Solr. The value must be an absolute path.
wasHome
The installation path for WebSphere Application Server.
searchServerName
The search server host name. Required if the search server host name was changed from the default name before migration.
searchServerPort
The search server port. Required if the search server port was changed from the default port before migration.
searchServiceContextRoot
The search service context root. For the Solr related actions such as configSolrCores and configWCforSolr, the default value is /solr.
indexsubtype
Specify -indexsubtype Inventory if you set up the inventory index in your earlier version of WebSphere Commerce.
If specified, the migrateSolrSearch script migrates the catalog entry, catalog group, unstructured, and inventory indexes for the master catalog at the same time.
If not specified, the migrateSolrSearch script migrates the catalog entry, catalog group, and unstructured indexes by default.
dbauser
The name of the DBA user. This parameter is required with the dbauserpwd parameter if you set up workspaces in your earlier version of WebSphere Commerce.
dbauserpwd
The password of the DBA user. This parameter is required with the dbauser parameter if you set up workspaces in your earlier version of WebSphere Commerce.

Example

From the following directory:
  • WC_installdir/components/foundation/subcomponents/search/bin
  • WCDE_installdir\components\foundation\subcomponents\search\bin
Run the utility:
  • WindowsmigrateSolrSearch.bat -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password [-searchServerName searchServerName] [-searchServerPort searchServerPort] [-indexsubtype indexsubtype] [-dbauser dbauser] [-dbauserpwd dbauserpwd]
  • AIXLinuxmigrateSolrSearch.sh -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password [-searchServerName searchServerName] [-searchServerPort searchServerPort] [-indexsubtype indexsubtype] [-dbauser dbauser] [-dbauserpwd dbauserpwd]
  • migrateSolrSearch.bat -masterCatalogId masterCatalogId

Ensure that the utility runs successfully by reviewing the log file to see the results of the migration. The log file is located is the location that is specified in the migrate-solr-search-logging.properties file.

By default, you can find the log at the following location:
  • WebSphere Commerce DeveloperWCDE_installdir\components\foundation\subcomponents\search\config\migrate-solr-search-logging.properties
  • AIXLinuxWindowsWC_installdir/components/foundation/subcomponents/search/config/migrate-solr-search-logging.properties
If the utility did not run successfully, you can modify the logging configuration file as needed, specifically the logging level:
Logging configuration file parameters
Parameter Value
Logging level
INFO
This is the typical level to use while running the utility. This level also lists all SQL statements you can use to roll back the migration.
FINEST
This level lists all details as the utility runs. Use this level if you encounter errors or exceptions during the migration and you need additional information for troubleshooting.
Log file location java.util.logging.FileHandler.pattern=../log/migrate-solr-search-logging.log