Indexing the Knowledgebases

Indexing is performed in the background. A background process, KMUpdate, is responsible for starting the indexer. Indexing a knowledgebase includes submitting records to the kmknowledgebaseupdates table.

Caution: There can be only one KMUpdate process running at any time. Starting more than one KMUpdate process causes unpredictable behavior on the search engine server.

When scheduled, KMUpdate runs every 5 minutes by default. This Repeat Interval is defined in the KMUpdate schedule record. When KMUpdate runs, the indexer starts. The indexer first queries for all knowledgebases of sclib type. Each knowledgebase has a field called interval. There is also an internal field called current interval. The indexer first checks that the interval value is not set to zero. An interval of zero causes the indexer to skip any further processing on this knowledgebase and the indexer then moves to the next knowledgebase in the list. If the interval is greater than zero, the indexer compares the value of interval to the value of the internal interval. If they do not match, the internal interval is incremented by 1 and saved. The indexer then skips any further processing of this knowledgebase and moves to the next knowledgebase in the list.

When the values of interval and internal interval match, the indexer queries the kmknowledgebaseupdates table for records matching the knowledgebase and begins processing them. Because of processing time, the intervals cannot be based on elapsed time. An interval of two would be 10 minutes only if all records from any knowledgebase with an interval of one were processed in under five minutes. Once complete, the indexer will move to the next knowledgebase in the list. KMUpdate is suspended during indexing so that it cannot start any new indexing until the indexer completes all knowledgebases in its list to prevent overlapping indexing.

Indexing a knowledgebase includes submitting records to the kmknowledgebaseupdates table. There are two ways to submit records to the kmknowledgebaseupdates table.

  • When an administrator selects Full Reindex on the Knowledgebase Maintenance form (the Status tab), the system performs the following processing:
    1. Delete the old knowledgebase index.
    2. Create a new empty knowledgebase index based on the current knowledgebase settings.
    3. Remove all records for the knowledgebase from the kmknowledgebaseupdates table.
    4. Execute the query provided on the Type Information tab, adding all matching records to the kmknowledgebaseupdates table.
  • When any record is modified in any table that has a knowledgebase associated with it, there are triggers in the tables associated with a knowledgebase that cause records to be submitted to the kmknowledgebaseupdates table.

Managing the KMUpdate process

The KMUpdate process controls indexing, which runs in the background. You use the Update Indexes form to stop and restart indexing, and to view the status statistics relating to indexing. If indexing has not started when you stop the KMUpdate process, the interval counter resets and the interval does not begin counting down until you start indexing.

Tip: You can also type status in the Command window to display any processes currently running in the system, and this will include the KMUpdate process. You can use the kill command to stop indexing or stop any scheduled indexing. Typically, this is only accessible to and done by a System Administrator.

To access the Update Indexes form, navigate to Knowledge Management > Configuration > Update Indexes.

Field Description
KMUpdate: Displays whether or not the KMUpdate process is scheduled: Scheduled, Not Scheduled.
Idle Time: When the KMUpdate process is scheduled, this field displays the amount of time the process has been idle. When this count reaches the Repeat Interval of the KMUpdate schedule record (default: 5 minutes), the KMUpdate process starts the indexer. If the indexer finds pending updates to the scheduled knowledgebase, the indexer processes them. Otherwise, the indexer updates the internal interval counter.
Indexer Status: Displays the status of indexing: Idle, or Running.
Knowledgebase: Displays the name of the knowledgebase currently being indexed.
Total Records: Displays the total number of records in the knowledgebase being indexed.
Current Record: Displays the current number of records that have been processed. Click Refresh to view the most current statistics for indexing that is in progress. (For the web client, click More > Refresh Statistics.)

The following figure shows a scenario where the indexer is indexing the Incident_Library knowledgebase.