Introduced in Feature Pack 3

Creating and scheduling the UpdateSearchIndex job

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

Feature Pack 6 or laterThe 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. Feature Pack 6 or laterIf index replication is configured through the replication.csv file, the command monitors the replication status from all the declared search slave servers.
  5. Feature Pack 6 or laterOnce all the slave servers have confirmed that index replication is completed, the command issues a final cache invalidation request. The UpdateSearchIndex process does not itself clear the cache. It requests that the next time the dynacacheinvalidation scheduled command is run, that command is to replay all previously registered cache invalidation requests. It will run all invalidation requests since the start time of the scheduler command, or the last run time of the UpdateSearchIndex 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.
  • Feature Pack 6 or laterWhen you schedule this job to replicate the search index (indexprop), ensure that the replication.csv file is located under the solrHome directory. For more information, see Propagating the WebSphere Commerce search index with the repeater.
  • 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:
      Feature Pack 5: Deprecated featurefullBuild
      Feature Pack 5: Deprecated featureIndicates to perform a full reindexing.

      Feature Pack 5 or laterUse the mode job parameter instead, as fullbuild is deprecated.

      Feature Pack 5 or latermode
      Feature Pack 5 or laterWhen indicated, the deprecated fullBuild job parameter is ignored.
      Feature Pack 5 or laterIndicates 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.
      Feature Pack 6 or later5
      Feature Pack 6 or laterFull reindexes are performed on only the specified Inventory index subtype.
      Feature Pack 6 or later6
      Feature Pack 6 or laterDelta reindexes are performed on only the specified Inventory index subtype.
      Feature Pack 5 or laterThe default value is 0.
      Feature Pack 5 or laterThe 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).
      Feature Pack 5 or latermasterCatalogId
      Feature Pack 5 or laterOptional: Scopes the reindexing to be performed only against all the supported languages of the provided master catalog.
      Feature Pack 5 or laterlanguageId
      Feature Pack 5 or laterOptional: Scopes the reindexing to be performed only against all the provided list of languages.
      Feature Pack 6 or laterindexSubType
      Feature Pack 6 or laterIndicates 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.

      For more information about the full set of parameters for scheduled jobs, see Scheduling a site-level job.

    3. Click OK.

Results

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