Updating an index

After an index has been created, a user can perform a bulk reindexing of the text column.

If SQL authorization is enabled, the database owner is the only account which can reindex a text column in another user's table. The following procedure reindexes the column across the whole table:

LUCENESUPPORT.UPDATEINDEX
(
    SCHEMANAME VARCHAR( 128 ),
    TABLENAME VARCHAR( 128 ),
    TEXTCOLUMN VARCHAR( 128 ),
    INDEXDESCRIPTORMAKER VARCHAR( 32672 )
)

The first three arguments identify the column to be reindexed. The last argument lets you override how the text is indexed and how queries are parsed.

This release of the luceneSupport tool does not support the incremental reindexing of data. Updating the index is a bulk operation, which reindexes an entire data set. For this reason, this release of the luceneSupport tool is not appropriate for update-intensive applications where the results of full-text queries must be current. The luceneSupport tool is better suited to applications for which yesterday's full-text query results are good enough:

Example

-- reindex a column using a custom analyzer
CALL LUCENESUPPORT.UPDATEINDEX
(
    'ruth', 'poemView', 'poemText',
    'myapp.MyIndexDescriptor.makeMe',
);
Related reference
Creating an index
Querying an index
Dropping an index
Listing indexes
Running the luceneSupport tool with a security manager