Documentation
(C) IBM Corp. 1996, 1999

Text Extender: Administration and Programming


Setting the frequency of index updates

When a text document is added to a database, or when an existing document in a database is changed, the document must be indexed to keep the content of the index synchronized with the content of the database. When a text document is deleted from a database, its terms must be removed from the index.

Information about which documents are new, changed, and deleted is automatically stored by triggers in a log table. The documents listed in the log table are indexed the next time an index update takes place.

The UPDATE INDEX command lets you update an index immediately on request, but, typically, you automatically update an index at intervals specified in the environment variable DB2TXUPDATEFREQ. The environment variable determines the default settings. The default settings can be overridden when creating an index using the ENABLE TEXT COLUMN or ENABLE TEXT TABLE commands. The update frequency can be changed for an existing index using the CHANGE INDEX SETTINGS command.

You specify the index update frequency in terms of when the update is to be made, and the minimum number of text documents that must be queued. If there are not enough documents in the log table at the day and time given, the index is not updated.

You should plan periodic indexing carefully; indexing text documents is a time- and resource-consuming task. The time taken is dependent on many factors, such as how many text documents have been added or changed since the previous index update, the size of the documents, and how powerful the processor is.

Syntax

>>-MIN--(--mindocs--)--D---(--+-*------------+---)---H---------->
                              |  .-,-------. |
                              |  V         | |
                              '----0...6---+-'
 
                                       .-,---------.
                                       V           |
>----(--+-*-------------+---)---M---(-----0...59---+---)-------><
        |  .-,--------. |
        |  V          | |
        '----0...23---+-'
 

MIN mindocs
The minimum number of text documents that must be queued before the index can be updated.

D
The day(s) of the week when the index is updated:

*
Every day

0
Sunday

1
Monday

2
Tuesday

3
Wednesday

4
Thursday

5
Friday

6
Saturday

H
The hour(s) of the specified day(s) when the index is updated:

*
Every hour

0...23
At the specified hour

M
The minute(s) of the specified hour(s) when the index is updated:

0...59
At the specified minute

Example: min(100) d(1,2,3,4,5) h(12,15) m(0)

If, at 12:00 or 15:00, on Monday to Friday, there are at least 100 text documents queued, the index is updated.

You can combine several frequency specifications:

Example: min(1) d(*) h(22) m(0) ; min(100) d(1,2,3,4,5) h(12,15) m(0)

Index updating is scheduled on Monday to Friday at 12:00 and 15:00 as before, but, in addition, each day at 22:00 the index is updated even if there is only one text document in the log table.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]