Altering a Text Search Collection

You can call this stored procedure to modify attributes of a collection that was created by SYSPROC.SYSTS_CREATE_COLLECTION. Only attributes explicitly specified on this procedure are changed. All other attributes of the index remain unchanged.

This is useful if you need to change the attributes of the collection, such as the update frequency, after the collection has already been created.

ALTER_COLLECTION

Authorization

This stored procedure is created with public authority *EXCLUDE and is owned by the creator of the text search collection.

The procedure will adopt the authority of the text search collection owner's profile. Authority can be granted to other users to allow them to execute the procedure.

Syntax

  >>-ALTER_COLLECTION--(--options-----------------------------><

The schema qualifier is the name of the text search collection.

Parameters

options
A character string that specifies the various options that are available for this stored procedure.

The data type for this parameter is VARCHAR(32000).

options
Read syntax diagramSkip visual syntax diagram update-characteristics
update-characteristics
Read syntax diagramSkip visual syntax diagramUPDATE FREQUENCYNONE< update-frequency >
update-characteristics
Specifies the frequency of automatic updates to the text search collection. The update process for a text search collection involves both indexing the text data, and crawling system objects to detect new or changed data.
UPDATE FREQUENCY update-frequency
Specifies when to make automatic updates to the text search collection. The default value is NONE.
update-frequency (Format 1)
Read syntax diagramSkip visual syntax diagramNONED(*0..6, 0..6)H(*0..23, 0..23)M(*0..59, 0..59)
NONE
If NONE is specified, then no further index updates are made. The update must be started manually.
D
Specifies the day or days of the week when the index is updated. An asterisk (*) specifies all days. 0 specifies Sunday.
H
Specifies the hour or hours when the index is updated. An asterisk (*) specifies all hours.
M
Specifies the minute or minutes when the index is updated. An asterisk (*) cannot be specified. The minimum update frequency is 5 minutes.
Example: This example specifies that the index update is to run every 30 minutes.
UPDATE FREQUENCY D(*) H(*) M(0,30)
update-frequency (Format 2, chronological)
Read syntax diagramSkip visual syntax diagram< minute>< hour>< dayOfMonth>< monthOfYear>< dayOfWeek>

The format of the update-frequency (chronological) option is a list of the five values separated by a blank space. The five values represent the minutes, hours, days of the month, months of the year, and days of the week beginning with Sunday.

If you specify an interval of values or an asterisk (*), you can specify a step value by using a forward slash (/) at the end of the defined interval.

Example: This example specifies that the index update is to run every quarter hour (0,15,30,45) on the even hours between 8 a.m. and 6:45 p.m. (8-18/2 is equivalent to 8,10,12,14,16,18), from Monday to Friday every month of the year (* * 1-5).

0,15,30,45 8-18/2 * * 1-5
minute
Specifies the minutes of the hour when the text search index is to be updated. You can specify an asterisk (*) for an interval of every 5 minutes, or you can specify an integer 0 - 59. You cannot repeat values. The minimum update frequency is 5 minutes. A value of 1,4,8 is not valid.
update-frequency (minute)
Read syntax diagramSkip visual syntax diagram*/ 0...59, 0...59 - 0...59/ 0...590...59
hour
Specifies the hours of the day when the text search index is to be updated. You can specify an asterisk (*) for every hour, or you can specify an integer 0 - 23. You cannot repeat values.
update-frequency (hour)
Read syntax diagramSkip visual syntax diagram*/ 0...23, 0...23 - 0...23/ 0...230...23
dayOfMonth
Specifies the days of the month when the text search index is to be updated. You can specify an asterisk (*) for every day, or you can specify an integer 1 - 31. You cannot repeat values.
update-frequency (dayOfMonth)
Read syntax diagramSkip visual syntax diagram*/ 1...31, 1...31 - 1...31/ 1...311...31
monthOfYear
Specifies the months of the year when the text search index is to be updated. You can specify an asterisk (*) for every month, or you can specify an integer 1 - 12. You cannot repeat values.
update-frequency (monthOfYear)
Read syntax diagramSkip visual syntax diagram*/ 1...12, 1...12 - 1...12/ 1...121...12
dayOfWeek
Specifies the days of the week when the text search index is to be updated. You can specify an asterisk (*) for every day, or you can specify an integer 0 - 7. Both 0 and 7 are valid values for Sunday. You cannot repeat values.
update-frequency (dayOfWeek)
Read syntax diagramSkip visual syntax diagram*/ 0...7, 0...7 - 0...7/ 0...70...7

Examples

  1. CALL MYCOLLECTION.ALTER_COLLECTION(‘UPDATE FREQUENCY H(0) M(0) D(*)');

    The update frequency value of collection MYCOLLECTION is changed. The text search collection will have an update frequency of every day, at 00:00.
  2. CALL MYCOLLECTION.ALTER_COLLECTION(‘UPDATE FREQUENCY NONE');

    This text search collection is changed to not scheduled. 

To alter a collection from IBM® Navigator for i, follow these steps.

  1. From IBM Navigator for i, expand IBM i Management > System > All Tasks.
  2. On the right panel, select System > OmniFind > Alter Collection.