Running the migrate Solr search utility
Run the migrate Solr search utility to migrate your search index to the new
version.
Before you begin
You cannot run the migrate Solr search utility on the IBM i operating system.
Instead, complete the following workaround to rebuild your search index on version 8.0.
Procedure
-
Complete one of the following tasks:
- Log on as a WebSphere Commerce non-root user.
- Log on with a user ID that is a member of the Windows Administration group.
-
Ensure that your administrative server is started.
For example:
- If WebSphere Commerce is managed by WebSphere Application Server Deployment Manager (dmgr), start the deployment manager and all node agents. Your cluster can also be started.
- If WebSphere Commerce is not managed by WebSphere Application Server Deployment Manager (dmgr), start the WebSphere Application Server server1.
-
If you are migrating from WebSphere Commerce Version 7 Feature Pack 2 - 5, and use catalog
filters, set up the search index to ensure that the catalog filters work in the new version:
- Complete the following task, specifying the configWCScheduleforCatalogFilter action: Setting up the search index.
-
Run the migrate Solr search utility for each master catalog ID:
- Go to the following directory:
- WC_installdir/components/foundation/subcomponents/search/bin
- Run the search index migration utility:
- migrateSolrSearch.bat -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password [-searchServerName searchServerName] [-searchServerPort searchServerPort] [-indexsubtype indexsubtype] [-dbauser dbauser] [-dbauserpwd dbauserpwd]
- migrateSolrSearch.sh -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password [-searchServerName searchServerName] [-searchServerPort searchServerPort] [-indexsubtype indexsubtype] [-dbauser dbauser] [-dbauserpwd dbauserpwd]
Where:- 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).
- dbuser
-
The name of the user that is connecting to the database.
The 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.
- 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.
- Go to the following directory:
-
Ensure that the utility runs successfully by reviewing the log file to see the results of the
migration. The log file's location is specified in the
migrate-solr-search-logging.properties file.
By default, you can find the log at the following location:
- WC_installdir/components/foundation/subcomponents/search/log/migrate-solr-search.log
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 com.ibm.commerce.level
- INFO
- The typical logging level to use for the utility. This level also lists all SQL statements that 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.log If you deployed the WebSphere Commerce Search cluster, ensure that the EAR changes are propagated to all the nodes.