Administer > Smart Analytics administration > Best practices > Perform indexing of large-scale knowledgebases

Perform indexing of large-scale knowledgebases

User Role: Administrator

Performing a full index of a large knowledgebase may take hours or even days to complete, which may have a significant impact on system resources. SMA-SM provides a ScriptLibrary AddToKMBUTable, allowing you to perform incremental indexing of knowledgebases. If you plan to perform full indexing of a large knowledgebase, we recommended that you perform indexing on a small amount of records first, and then perform a number of incremental indexing jobs for the rest of the records. The ScriptLibrary AddToKMBUTable enables you to perform incremental indexing.

The following section is an example of how to perform full indexing of a large scale knowledgebase.

Suppose there are 4 million records in your Interaction_Library which were created in the past 12 months, and you want to perform full indexing on all these records. To reduce potential downtime, you can perform the full index as follows:

  1. Perform a full index on records created within 3 months.

    1. Open the Smart Search Configuration page.
    2. In the Current Knowledgebase List section, click the corresponding link to open Interaction_Library. Then, the Knowledgebase maintenance page is displayed.
    3. In the Table Query field, specify a Service Manager style query so that only records created within 3 months are indexed, as shown below:

      open.time>='05/25/16'

      Modify other fields as necessary.

    4. Click the Full Reindex button.

    5. Wait for Service Manager to finish indexing the records that match specified conditions.

  2. Perform incremental index on records created within 6 months but older than 3 months.

    1. Once the index status turns to Finished, re-specify the Table Query to set the time frame to 6 months since now, as shown below:

      open.time>='02/25/16'
    2. Open the AddToKMBUTable ScriptLibrary.

    3. Locate the following function:

      function addRecordToKBU(filename,query)
      

      Then, update the value to perform incremental index on records that have not been full re-indexed while you have re-specified in the Table Query field, as shown below:

      function addRecordToKBU("incidents",open.time>='02/25/16' and open.time<='05/25/16')
      
    4. Click Execute

  3. Perform incremental index on records created within 9 months but older than 6 months.

  4. Perform incremental index on records created within 12 months but older than 9 months.