Running the migrate Solr search utility

Run the migrate Solr search utility to migrate your search index to the new version.

Before you begin

For IBM i OS operating systemYou 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

  1. Complete one of the following tasks:
    • LinuxAIXLog on as a WebSphere Commerce non-root user.
    • WindowsLog on with a user ID that is a member of the Windows Administration group.
  2. 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.
  3. 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:
    1. Complete the following task, specifying the configWCScheduleforCatalogFilter action: Setting up the search index.
  4. Run the migrate Solr search utility for each master catalog ID:
    1. Go to the following directory:
      • WC_installdir/components/foundation/subcomponents/search/bin
    2. Run the search index migration utility:
      • WindowsmigrateSolrSearch.bat -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password [-searchServerName searchServerName] [-searchServerPort searchServerPort] [-indexsubtype indexsubtype] [-dbauser dbauser] [-dbauserpwd dbauserpwd]
      • LinuxAIXmigrateSolrSearch.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).
      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.
  5. 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 levelcom.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.