Modifying the options of a text search index

The Db2 database administrator runs a program that calls the SYSPROC.SYSTS_ALTER stored procedure to modify the options of an existing text search index.

Before you begin

Important: Begin information about IBM Text Search for DB2 for z/OS. This information applies to IBM® Text Search for Db2 for z/OS®. End information about IBM Text Search for DB2 for z/OS.

You can alter only text search indexes that were created by using the SYSPROC.SYSTS_CREATE stored procedure.

About this task

You can alter the frequency of updates to a text search index, the minimum number of changes to text documents before a text search index is updated, and some configuration options. You also can alter the schema and name of the user-defined function that accesses text documents.

Procedure

To modify the options of a text search index:

  1. Run a program that calls the SYSPROC.SYSTS_ALTER stored procedure.
  2. After you modify the options for a text search index, run the SYSPROC.SYSTS_UPDATE stored procedure to update the text search index that is stored on the text search server.

Example

Example 1: The following example shows a sample program that modifies a text search index by calling the SYSPROC.SYSTS_ALTER stored procedure. This example modifies the frequency of updates, the minimum number of changes to text documents before an index is updated, and some configuration options.

CALL SYSPROC.SYSTS_ALTER('USRT002', 'INDEX2' ,' UPDATE FREQUENCY NONE 
UPDATE MINIMUM 1 INDEX CONFIGURATION (UPDATEAUTOCOMMIT 200 , 
IGNOREEMPTYDOCS 1 , UPDATEWITHBACKUP 1 ,COMMENT NEWINDEXOPTIONS)'  )

Example 2: The following example calls the SYSPROC.SYSTS_ALTER stored procedure to modify the name of the user-defined function that accesses text documents. This example also shows calling the SYSPROC.SYSTS_UPDATE stored procedure to update the text search index that is stored on the text search server.

CALL SYSPROC.SYSTS_ALTER('USRT002', 'INDEX2' ,‘RENAME FUNCTION 
FCT_NEWNAME’ )
CALL SYSPROC.SYSTS_UPDATE('USRT002', 'INDEX2', ' ' );