For IBM i OS operating system

Migrating search indexes on IBM i

Running the migrateSolrSearch utility on IBM i is not supported. As a workaround, you must rebuild your search index onto the version 8.0 environment. Before you can run the rebuild your search index version 8.0, delete your search index and run the setupSearchIndex utility.

Before you begin

  1. Ensure that your WebSphere Commerce server and search server are stopped.
  2. Back up the following files and directories:
    • Search_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
    • WC_installdir/instances/instance_name/search/pre-processConfig/
    • solrhome/*

Procedure

  1. Delete the search cores from your wc-search.xml file for the catalog you are rebuilding.
    1. Open the following version 8.0 file for editing:
      • Search_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
    2. Search for <_config:core to locate your index.

      For example:

      <_config:core catalog="10001" indexName="CatalogEntry"
           language="en_US" name="MC_10001_CatalogEntry_en_US"
           path="/MC_10001/en_US/CatalogEntry" serverName="AdvancedConfiguration_1"/>
      <_config:core catalog="10001" indexName="UnstructuredContent"
           language="en_US"
           name="MC_10001_CatalogEntry_Unstructured_en_US"
           path="/MC_10001/en_US/CatalogEntry/unstructured" serverName="AdvancedConfiguration_1"/>
      <_config:core catalog="10001" indexName="CatalogGroup"
           language="en_US" name="MC_10001_CatalogGroup_en_US"
           path="/MC_10001/en_US/CatalogGroup" serverName="AdvancedConfiguration_1"/>
    3. Delete the cores for the catalog you want to rebuild.
    4. Save and exit the file.
  2. Go to the following directory, and delete the catalog folder you are rebuilding, for example, MC_10001.
    • WC_installdir/instances/instance_name/search/pre-processConfig/
  3. Go to your solrhome, and delete the catalog directory you are rebuilding, for example, MC_10001.
  4. Delete the core instances from your solr.xml file for the catalog you are rebuilding.
    1. Open the following version 8.0 file for editing:
      • solrhome/solr.xml
    2. Search for <core instanceDir to locate the core instances for your catalog.

      For example:

      <core instanceDir="MC_10001/en_US/CatalogEntry/" name="MC_10001_CatalogEntry_en_US"/>
      <core instanceDir="MC_10001/en_US/CatalogEntry/unstructured/" name="MC_10001_CatalogEntry_Unstructured_en_US"/>
      <core instanceDir="MC_10001/en_US/CatalogGroup/" name="MC_10001_CatalogGroup_en_US"/>
      
    3. Delete the core instances for the catalog you want to rebuild.
    4. Save and exit the file.
  5. Connect to your database and run the following SQL commands:
    1. delete * from instance_name.ti_delta_catentry
    2. delete * from instance_name.ti_delta_catgroup
  6. Start the WebSphere Commerce server and the search server.
  7. Run setupSearchIndex utility.
    Note: Ensure that the QEJBSVR user profile has WRITE authority for the following directory: QIBM/UserData/CommerceServer80/instances/instance_name/temp
    Example
    
    CHGAUT OBJ('/QIBM/UserData/CommerceServer80/instances/demo/temp') USER(QEJBSVR) DTAAUT(*RWX) SUBTREE(*ALL) SYMLNK(*NO)  
    
    1. Go to the following directory:
      • WC_installdir\components\foundation\subcomponents\search\bin
    2. Run the search index setup utility:
      • setupSearchIndex.sh -instance instance_name [-action action] [-propFile propFile] -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password [-solrhome solrhome] [-indextype indextype] [-setupWebContent true | false] [-dbauser dba_user] [-dbauserpwd dba_userpwd] [-createAll true | false] [-indexsubtype indexsubtype] [-includeUpdate true | false]
      Where:
      action
      Optional: Prepares the search index for certain scenarios. Typically, you run the utility without specifying an action, unless you need to run a specific action during this task, such as resetting search cores.

      Action names that end with Update as its suffix indicate that the action applies to an existing core, instead of setting up a new core.

      The following actions are supported:
      configWCforReset
      When used with the configSolrCoresReset parameter, resets search cores on the WebSphere Commerce server after a previous search index is already set up. When search cores are reset, all core-related information, such as XML configuration files and database information is deleted.
      To reset all Solr cores, set the masterCatalogId parameter to all when you use this action.
      configSolrCoresReset
      Resets search cores on the Solr machine.
      When search cores are reset, all core-related information, such as XML configuration files and database information is deleted.
      If masterCatalogId is set to all, all Solr cores are reset.
      configWCScheduleforCatalogFilter
      Uses the EXPRESSION table for entitlement. You need to use this action in the following scenarios:
      • When you want to import catalog filter expressions to the search index in a migrated version 7 environment.
      • If you dataload your catalog filters.
      configWCforSolrUpdate
      Configures WebSphere Commerce to apply updates.
      configSolrCoresUpdate
      Configures Solr to apply updates.
      The following actions support the managed configuration:
      configSolrCoresAdv
      Sets up the advanced file structure for the type that is specified in the propFile property file.
      configSolrCoresAdvUpdate
      Updates an existing advanced file structure for the type that is specified in the propFile property file. This action is used to apply features that are provided by interim fixes.
      configSolrCoresAdvReset
      Resets the advanced file structure for the specified master catalog ID and the type that is specified in the propFile property file.
      configWCforSolrAdv
      Updates the remote database based on the remote database information that is provided in the propFile property file.
      configWCforSolrAdvLocal
      Updates the local database based on the local database information that is provided in the propFile property file.
      configWCforManagedPreprocess
      Allows Management Center Store preview to work in a clustered environment where all machines that have different preprocess directories.
      propFile
      The full path to the loading.properties input properties file, when you are working with a clustered environment that uses the managed configuration. For more information, see Setting up the WebSphere Commerce Search index structure for a specific master catalog in the managed configuration.
      masterCatalogId
      The ID of the master catalog (for example, 10101) to set up the search index. Or, indicate all to set up the search index for all master catalogs.
      If you do not know the master catalog ID, run the following SQL for your starter store:
      SQL: select * from catalog where IDENTIFIER='STORE_IDENTIFIER'
      
      To find the master catalog ID for an Extended Site store:
      1. Find the store ID:
        select * from storeent where IDENTIFIER='STORE_IDENTIFIER'
        
      2. Use the storeent_id as the store_id in the following SQL to find the catalog asset store ID of this Extended Site store:
        
        select * from storerel where store_id=XXXXXX and streltyp_id=-4 and relatedstore_id not in (XXXXXX)
        
        Where XXXXXX is the storeent_id.
      3. Get the master catalog ID:
        
        select * from storecat where storeent_id=YYYYYY and mastercatalog='1'
        
        Where YYYYYY is the relatedstore_id.
      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
      Optional: The location of the Solr home directory path that contains the index data of Solr. The value must be an absolute path.
      Default location:
      • For IBM i OS operating systemWC_instance_root/search/solr/home
      indextype
      Optional: Indicates the search engine index to set up. Valid values:
      CatalogEntry
      Sets up the index for catalog entries in the master catalog.
      CatalogGroup
      Sets up the index for categories in the master catalog.
      If you do not use the indextype parameter, both the CatalogEntry and CatalogGroup indexes are built by default.
      setupWebContent
      Optional: A flag to indicate whether to prepare the basepath and storeid for building the site content index. If false, the basepath and storeid are not added to the config column in the SRCHCONFEXT table. The default value is true.
      Note: Exceptions might occur if your site contains many extended sites and you run setupWebContent. To avoid this issue, enable autoIndex within the droidConfig.xml file.
      dbauser
      The name of the DBA user. This parameter is required with the dbauserpwd parameter to create the workspace indexes.
      dbauserpwd
      The password of the DBA user. This parameter is required with the dbauser parameter to create the workspace indexes.
      createAll
      Indicates whether to create cores for all available workspaces, including non-allocated workspaces. The default value is false, where cores are only created for allocated workspaces.
      indexsubtype
      Optional: Indicates the search engine index subtypes to set up. Valid values:
      Inventory
      Sets up the index for inventory data.
      The inventory index supports only stores that use the non-ATP inventory system.
      Price
      Sets up a subindex for price data to be used with Index Load, instead of storing it in the catalog entry core.
      includeUpdate
      Indicates whether the utility applies optional features that are provided by interim fixes.
      For example, features that exist in the following directories:
      • catalog-update
      • template-update

      The default value is false.

    3. Ensure that the utility runs successfully; or review the log file, WC_installdir/components/foundation/subcomponents/search/config/logging.properties.
      You can get more logging information by updating the logging level from INFO to FINEST:
      
      # Default global logging level, INFO
      com.ibm.commerce.level=FINEST
      
      For more information about the log file, and to enable more logging details, see Enabling tracing and logging for WebSphere Commerce Search.
  8. Repeat the steps 1 to 7 for every catalog you plan to rebuild in version 8.0.

What to do next

Preprocessing the search index