Create catalog index

The Create Catalog Index transaction builds the Apache Lucene index file that is used by catalog search. This index file enhances search performance by storing denormalized item data that has been extracted from the Sterling Order Management System database or from an external source.

The Create Catalog Index transaction can be configured to perform the following tasks:

  • Run either a scheduled index build or user-initiated index build
  • Build either a full or incremental index file
  • Activate the index file

The index building process

The Create Catalog Index transaction provides an agent for index building. Index building is a multithread process in which the index building agent extracts item and item-related information from the active selling catalog in the Sterling Order Management System database. If the corresponding XML configuration file has been extended, the agent may extract this information from an external source.

The agent writes this information to multiple files, which identify the item data that should be included in the final index. After the agent finishes writing the files, it merges them into the final index file.

The multithread process provides the advantage of parallel processing. Large amounts of database data are segmented and processed simultaneously, which is faster and more scalable than sequentially processing one long file.

When writing information to multiple files, the index building agent performs the following tasks for each item before looping to the next item:

  • Queries the Sterling Order Management System database or an external source for data about the item.
  • Uses information from the XML configuration file and extension file to determine the data that be retrieved from the query.
  • Retrieves relevant data from the Sterling Order Management System database.
  • Creates a Lucene document for the item.

After the transaction creates a Lucene document for each item, the transaction writes the documents to the index file based on the organization and the organization's locales.

Configuration options for accessing catalog index files

You can configure catalog index builds in one of the following two ways, depending on your business requirements:

  • Build the index on a shared, central disk that is accessible from all servers.
    • Advantages:
      • Centralized control of shared index
      • No file transfer issues because the index is not copied across multiple servers
    • Limitation:
      • Shared disk could become a single point of failure (if no redundancy is involved)
      • Volume of reads and writes from shared disk might slow performance, depending on the setup
  • Build and push a copy of the index to multiple servers via file transfer. Automate this file transfer process to occur on completion of an index build, but do not automatically activate the index. When all servers have acknowledged the completion of the file transfer, call the manageSearchIndexTrigger API to activate the index.
    • Advantage:
      • No central point of failure
    • Limitation:
      • Possible overhead to building an pushing index files across servers

        If you choose this method of building the index in one location and reading it from another, refer to the Configuring Property Files topic for information about enabling different properties for individual processes.

For more information about building and searching catalog indexes, see the Catalog Management Concepts topic.

Attributes

The following table displays the attributes for the Create Catalog Index transaction.

Table 1. Create catalog index attributes
Attribute Value
Base Transaction ID Create_Catalog_Index
Base Document Type General
Base Process Type General
Abstract Transaction No
APIs Called None
User Exits Called YCMParseAssetUE

YCMGetAdditionalCatalogIndexInformationUE

Criteria parameters

The following table displays the criteria parameters for the Create Catalog Index transaction.

Table 2. Create catalog index criteria parameters
Parameter Description
Organization Code Required. The organization code of the catalog organization or subcatalog organization that maintains the search index.
Number of Messages Required. Number of messages to use when building the index file.

Sterling Order Management System processes only one message per thread. For example, if Number of Messages is set to 10 and Threads is set to 3, Sterling Order Management System processes only 3 messages at a time. For more information about fine-tuning system performance, see the Considerations for Performance Management topic.

Incremental Build Y or N.

Y to rebuild the existing index file. If you specify Y, Sterling Order Management System rebuilds the index based on the last successful index build. The MaxModifyTS column in the YFS_ITEM table determines whether or not an item's attributes have changed. If any external attributes of an item have changed, update the MaxModifyTS column by calling the manageItem API on the item.

N to build a full index file.

This parameter is ignored for user-initiated index builds. However, if scheduled builds are configured, ensure that you specify whether you want a full or incremental index build.

Category Domain Optional. The catalog from which the index is built. The active selling catalog of the catalog organization or subcatalog organization is the default. If scheduled builds are configured, ensure that you specify a catalog.
Auto Activate Y or N. Optional.

Y to activate the index after building the index file.

The default is N.

Auto Insert Search Index Trigger Y or N. Optional.
Y to enable scheduled builds of the catalog index file. The agent refers to information stored in the YFS_SEARCH_INDEX_TRIGGER table to determine when to run the scheduled index build. Specify the type of index build, whether full or incremental, in the agent criteria.

N to enable user-initiated builds of the catalog index file. The agent continuously queries the YFS_SEARCH_INDEX_TRIGGER table to determine whether an index build is indicated. If a user starts an index build from the IBM® Sterling Business Center, the status setting in the table changes to Scheduled, triggering the agent to build the index. The user specifies the type of index build, whether full or incremental, from the Sterling Business Center.

After a scheduled or user-initiated build runs, the user can activate the index from the Sterling Business Center. Alternatively, the agent can be configured to automatically activate the index.

To allow both scheduled and user-initiated index builds, configure the transaction to include two instances of the agent. Configure one instance to trigger user-initiated builds and the second instance to trigger scheduled index builds.

ColonyID Required in a multischema deployment where a table may exist in multiple schemas. Runs the agent for the colony.

Statistics tracked

The following table shows the statistics for the Create Catalog Index transaction.

Table 3. Create catalog index statistics
Statistic Name Description
SearchIndicesBuilt Number of search indices that have been built.

Pending job count

None.

Events raised

The following events are raised by this time-triggered transaction:

Table 4. Events raised by the create catalog index transaction
Transaction/Event Key Data Data Published Template Support?
ON_SUCCESS Not Published CATALOG_INDEX_BUILD.ON_SUCCESS.xml Yes

What next

After you create a catalog index, you can create a new search index to use the catalog index. For more information about creating a new search index, see the Generate a New Search Index topic.