Setting up the WebSphere Commerce Search index structure for a specific master catalog in the managed configuration

You can deploy your search index structure on your WebSphere Commerce server in the managed configuration. Then, you can configure WebSphere Commerce to use the Solr index by preparing the input property file and running the search index setup utility. This utility ensures that your index is built successfully by using your WebSphere Commerce master catalog data.

Before you begin

  • WebSphere Commerce DeveloperEnsure that the test server is stopped.
  • 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.
  • For IBM i OS operating systemEnsure that the QEJBSVR user profile has WRITE authority for the following directory:
    • QIBM/UserData/CommerceServer80/instances/instance_name/temp
    For example:
    
    CHGAUT OBJ('/QIBM/UserData/CommerceServer80/instances/demo/temp') USER(QEJBSVR) DTAAUT(*RWX) SUBTREE(*ALL) SYMLNK(*NO)  
    
  • Ensure that you complete the following task: Setting up the search index.
Note:

When APAR JR55671 is applied, you can create managed workspace cores when specifying the related workspace parameter, such as dbauser/dbauserpwd and the optional -createAll parameter. With this ifix, the index files are created under a Data directory, hence it changes the index location. An index rebuild is required to activate the changes.

About this task

The following list shows the high-level steps that are associated with setting up the production managed search index configurations:
  1. The input properties file (loading.properties) is prepared to contain the managed configuration settings.
  2. The setup search index utility is run, specifying the configSolrCoresAdv action and -propFile parameter to work with the managed configuration.
  3. Custom properties and customizations are reapplied to the generated managed-solr templates where applicable.

Procedure

  1. Prepare the input properties file.
    1. Create a loading.properties file that contains the following structure:
      
      config.template=configuration_template
      repeater.master=master_machine
      slave.master=repeater_machine
      repeater.solr.home=repeater_solrhome
      slave.poll.interval=polling_interval
      
      Where:
      configuration_template
      The type of managed configuration to set up. For example, slave,repeater or slave,master sets up the subordinate and repeater, or subordinate and master managed Solr configurations.
      master_machine
      The master URL for the replication of the repeater. This URL points to the master index of the repeater.
      repeater_machine
      The master URL for the replication of the subordinate. This URL points to the repeater machine.
      repeater_solrhome
      Either the absolute path of the repeater Solr home that you later deploy to, or the relative path to the search profile path of the repeater.
      polling_interval
      The polling interval for the subordinate replication. If not specified, the subordinate machines will not automatically poll.
      For example, to set up the subordinate and repeater:
      
      config.template=slave,repeater
      repeater.master=myauthoring.mycompany.com:3737
      slave.master=myrepeater.mycompany.com:3737
      repeater.solr.home=./installedApps/demo_search_cell/Search_demo.ear/repeater/solr/home
      slave.poll.interval=00:10:00
      
      To set up the subordinate and master:
      
      config.template=slave,master
      slave.master=myrepeater.mycompany.com:3737
      master.solr.home=./installedApps/demo_search_cell/Search_demo.ear/master/solr/home
      slave.poll.interval=00:10:00
      
      To set up subordinate, master, and repeater:
      
      config.template=slave,repeater,master
      slave.master=myrepeater.mycompany.com:3737 
      repeater.master=myauthoring.mycompany.com:3737
      slave.master=myrepeater.mycompany.com:3737 
      master.solr.home=./installedApps/demo_search_cell/Search_demo.ear/master/solr/home 
      repeater.solr.home=./installedApps/demo_search_cell/Search_demo.ear/repeater/solr/home
      slave.poll.interval=00:10:00
      
    2. Save your changes and close the file.
  2. Run the setup search index utility.
    1. Complete one of the following tasks:
      • AIXLinuxLog on as a WebSphere Commerce non-root user.
      • For IBM i OS operating systemLog on with a user profile that has *SECOFR authority.
      • WindowsLog on with a user ID that is a member of the Windows Administration group.
    2. Go to the following directory:
      • WC_installdir\components\foundation\subcomponents\search\bin
      • WebSphere Commerce DeveloperWCDE_installdir\components\foundation\subcomponents\search\bin
    3. Run the search index setup utility, additionally specifying the configSolrCoresAdv action and -propFile property file location:
      • WebSphere Commerce DevelopersetupSearchIndex.bat -action configSolrCoresAdv -propFile propFile [util-specific-params]
      • WindowssetupSearchIndex.bat -action configSolrCoresAdv -propFile propFile [util-specific-params]
      • For IBM i OS operating systemAIXLinux./setupSearchIndex.sh -action configSolrCoresAdv -propFile propFile [util-specific-params]
      Where:
      action
      Prepares the search index for certain scenarios, such as the managed configuration.
      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.
      util-specific-params
      For more information about utility-specific parameters and actions that are not related to the managed configuration, see setupSearchIndex utility.
    4. Ensure that the utility runs successfully.
      For example:
      • Ensure that the specified templates in the property file are generated.
      • Ensure that the specified host names and poll interval values that are specified in the input property file are included in each of the generated templates solr.xml files.
      Consult the following table for the utility results:
      Search setup utility results
      Results Description
      Search index setup successfully completed without errors. The utility ran successfully.
      Search index setup successfully completed with warnings. Check the log file for more information. The utility ran successfully but with warnings. Some warnings might be generated during the setup index process. However, they might not be important such as the utility skipped existing cores that are already created.
      Search index setup successfully completed with errors. Check the log file for more information. The utility ran successfully but with errors. The job did not completely finish setup. Check the log files to see where the problem occurred.
      Search index setup not successful. An unrecoverable error has occurred. Check the log file for more information. The utility did not run successfully. Check the log files to see where the problem occurred.
      You can find the log file in the following location:
      • 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.
    5. Restart the WebSphere Commerce Search server.
  3. If you have customized the search indexing configuration files, ensure that you apply the same customizations to the generated managed-solr templates where applicable.