Altering a text index

Summary

When
When the update frequency or index and work directories have to be changed.
Command
ALTER INDEX
Authorization
CONTROL on the table

Use this command to change the index work directory, the update frequency of an index, or the cache characteristics, principally the MAXIMUM CACHE SIZE or PCTFREE. If you do not specify an update frequency, the current settings are left unchanged. If an index update or search is running, an error message displays. This states that the index is currently locked and no changes can be made.

The following example changes the update frequency for the index.

db2text ALTER INDEX comment FOR TEXT
          UPDATE FREQUENCY d(1,2,3,4,5) h(12,15) m(00) UPDATE MINIMUM 100

In this example, the index is to be updated at 12:00 or 15:00, on Monday to Friday, if a minimum of 100 text documents are in the queue.

Use the following command to stop the periodic updating of an index:

db2text ALTER INDEX comment FOR TEXT
                       UPDATE FREQUENCY NONE

If the index is copied from one directory to another, the index is locked during this process. However, after copying, the index is unlocked and can be used again.