Optimizing a Db2 Text Search index

Db2 Text Search index optimization compacts the text search index and speeds up indexing and searching. Optimization removes deleted documents from the text search index and merges the index segment files on the disk.

Optimization and indexing of the same index cannot be performed in parallel. Take this into account when scheduling optimization and indexing sessions. However, optimization and search can be performed in parallel. Disk space consumption during index optimization can be high, especially if the same index is searched in parallel.

You can optimize the index after you completely index your document set or after incremental index updates. Index optimization can take a long time, depending on the index size. If your incremental updates add documents frequently, perform optimization less frequently to minimize the extra processor usage for the optimization process.

To optimize the index:
  1. From the ECMTS_HOME/bin directory, start the administration tool with the optimizeIndex command. For example:
    adminTool.bat optimizeIndex -configPath 
    "C:\Program Files\IBM\ECMTextSearch\config" 
    -collectionName MyCollection
  2. You can check the status of the last executed optimization process by running the administration tool with the optimizeIndexStatus command.