Introduced in Feature Pack 3

migrateSolrSearch utility

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

Feature Pack 7 or later

Syntax diagram for migrateSolrSearch utility

Syntax diagrams for earlier feature packs:

Parameter values

Note: The parameters might vary, depending on the machine that you are running the utility on. See Migrating WebSphere Commerce search for environment-specific tasks.
action
The migration action, depending on the machine that is running the utility.
For example, configWCforSolrMigration when it is running on the WebSphere Commerce server, or configSolrCoresMigration when it is running on the remote search server.
Feature Pack 8Note: You must install the interim fix for APAR JR53113 (included in mandatory cumulative Interim Fix JR53438 for Feature Pack 8) to use this action. For more information, see Enabling interim fix JR53113.
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'
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.
Feature Pack 5 or laterOracledbURL
Feature Pack 5 or laterOracle1 The database URL the utility uses to connect to the database. If not provided, the utility constructs a database URL based on the default database value.
solrhome
The location of the Solr home directory path that contains the index data of Solr. The value must be an absolute path.
The default value is:
  • WebSphere Commerce DeveloperWCDE_installdir/search/solr/home
  • SolarisLinuxAIXWindowsWC_installdir/instances/instance_name/search/solr/home
  • For IBM i OS operating systemWC_instance_root/instances/instance_name/search/solr/home
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.
Feature Pack 7 or laterindexsubtype
Feature Pack 7 or laterSpecify -indexsubtype Inventory if you setup the inventory index in an earlier feature pack version.
Feature Pack 7 or laterIf specified, the migrateSolrSearch script migrates the catalog entry, catalog group, unstructured, and inventory indexes for the given master catalog at the same time.
Feature Pack 7 or laterIf not specified, the migrateSolrSearch script migrates the catalog entry, catalog group, and unstructured indexes by default.
Feature Pack 7 or laterdbauser
Feature Pack 7 or laterThe name of the DBA user. This parameter is required with the dbauserpwd parameter if you setup workspaces in an earlier feature pack version.
Feature Pack 7 or laterdbauserpwd
Feature Pack 7 or laterThe password of the DBA user. This parameter is required with the dbauser parameter if you setup workspaces in an earlier feature pack version.

Example

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

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
  • SolarisLinuxAIXWindowsWC_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
1 Feature Pack 5You must apply the interim fix for APAR #JR44514 to use this parameter.