Creating and scheduling the UpdateSearchIndex job

The UpdateSearchIndex job command is used for synchronizing Quick Publish catalog changes with the search index in production.

The UpdateSearchIndex job processes a re-indexing request by launching the index preprocessor. The class is synchronized, so that there is only at most one thread that could be run for re-indexing. Upon completion of re-indexing, either delta or full, another event is raised to release an internal synchronization lock. The following list highlights the main logic flow for the scheduler command:
  1. It performs a check to see if there is already an indexing process or indexing replication occurring. If so, the command immediately aborts. Otherwise, it applies an indexing synchronization lock.
  2. It performs the index preprocessing logic.
  3. It builds the search index by calling the Data Import Handler (DIH).
  4. If index replication is configured through the replication.csv file, the command monitors the replication status from all the declared search slave servers.
  5. Once all the slave servers have confirmed that index replication is completed, the command issues a final cache invalidation request to replay all previously registered cache invalidation requests since the start time of the scheduler command, or the last run time of this command, whichever is earlier.
  6. It releases the indexing synchronization lock.
Note:
  • The UpdateSearchIndex job must be run on a server that does not provide services to users because of performance considerations.
  • The UpdateSearchIndex job does not index site content. You must index site content using the site content crawler utility. For more information, see Indexing site content with WebSphere Commerce Search.
  • When you schedule this job to replicate the search index (indexprop), ensure that the replication.csv file is located under the solrHome directory.
  • If you have deployed the inventory index, the UpdateSearchIndex job can refresh the inventory index at a different interval than the product index.

Procedure

  1. Open the Administration Console and select Site on the Administration Console Site/Store Selection page.
  2. Click Configuration > Scheduler. A list of jobs that are scheduled to run is displayed.
  3. Create the UpdateSearchIndex job:
    1. Click New.
    2. Create the UpdateSearchIndex job with the following values:
      New Scheduled Job: UpdateSearchIndex
      Parameter Value
      Job command UpdateSearchIndex
      Job parameters Enter job parameters as required:
      fullBuild
      Indicates to perform a full reindexing.

      Use the mode job parameter instead, as fullbuild is deprecated.

      mode
      When indicated, the deprecated fullBuild job parameter is ignored.
      Indicates the type of reindexing to perform:
      0
      Both delta and full reindexes are performed on the catalog entry, unstructured content, and catalog group indexes.
      1
      Only delta reindexes are performed on the catalog entry, unstructured content, and catalog group indexes.
      2
      Forces a full reindexing that is performed on the catalog entry, unstructured content, and catalog group indexes.
      3
      Both delta and full reindexes are performed on only the catalog entry and catalog group indexes.
      4
      Reindexes are performed on only the unstructured content index.
      5
      Full reindexes are performed on only the specified Inventory index subtype.
      6
      Delta reindexes are performed on only the specified Inventory index subtype.
      The default value is 0.
      The selected mode can be combined with the masterCatalogId parameter to have better control over the reindexing operation.
      Note: This administrative command ignores the delta or full build index option that is defined in the WebSphere Commerce Search configuration file (wc-search.xml).
      masterCatalogId
      Optional: Scopes the reindexing to be performed only against all the supported languages of the provided master catalog.
      indexSubType
      Indicates the index subtype to reindex on. For instance, Inventory.
      Start date Enter the current date.
      Start time Enter a time that you want to start the job for the first time.
      Schedule interval Type the number of seconds between successive runs of this job. If this parameter is omitted, the job runs only 1 time. A typical schedule interval for this job is 600 seconds (10 minutes).

      If the job takes more than 10 minutes to run, the next scheduled job is skipped. That is, only 1 instance of the indexing is run per master catalog.

      Job priority Enter 10 to indicate that the job is high priority.
      Application type Enter Search as the type so that the job is completed under a separate work manager thread pool.
    3. Click OK.

Results

Your job is listed on the Scheduler Status Display page and runs at the specified start time.