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).
- 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.
- 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)
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 to8,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.
- 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.
- 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.
- 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.
- 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.
Examples
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.
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.
- From IBM Navigator for i, expand IBM i Management > System > All Tasks.
- On the right panel, select System > OmniFind > Alter Collection.