ALTER TEXT CONFIGURATION Statement

Alters a text configuration object.

Syntax

ALTER TEXT CONFIGURATION  [  owner.]config-name
   STOPLIST stoplist 
   | DROP STOPLIST
   | { MINIMUM | MAXIMUM } TERM LENGTH integer
   |  TERM BREAKER 
      { GENERIC 
        [ EXTERNAL NAME  library-and-entry-point-name-string ] 
       | NGRAM }
   |  PREFILTER EXTERNAL NAME library-and-entry-point-name-string
stoplist: string-expression
library-and-entry-point-name-string: [operating-system:]function-name@library

Examples

Usage

Use ALTER TEXT CONFIGURATION to change a text configuration object.

TEXT indexes are dependent on a text configuration object. Sybase IQ TEXT indexes use immediate refresh, and cannot be truncated; you must drop the indexes before you can alter the text configuration object.

To view the settings for text configuration objects, query the SYSTEXTCONFIG system view.

STOPLIST clause – use this clause to create or replace the list of terms to ignore when building a TEXT index. Terms specified in this list are also ignored in a query. Separate stoplist terms with spaces.

Stoplist terms cannot contain whitespace. Stoplist terms should not contain non-alphanumeric characters. Non-alphanumeric characters are interpreted as spaces and break the term into multiple terms. For example, “and/or” is interpreted as the two terms “and” and “or”. The maximum number of stoplist terms is 7999.

DROP STOPLIST clause – use this clause to drop the stoplist for a text configuration object.

MINIMUM TERM LENGTH clause – specifies the minimum length, in characters, of a term to include in the TEXT index. The value specified in the MINIMUM TERM LENGTH clause is ignored when using NGRAM TEXT indexes.

Terms that are shorter than this setting are ignored when building or refreshing the TEXT index. The value of this option must be greater than 0. If you set this option to be higher than MAXIMUM TERM LENGTH, the value of MAXIMUM TERM LENGTH is automatically adjusted to be the same as the new MINIMUM TERM LENGTH value.

MAXIMUM TERM LENGTH clause – with GENERIC TEXT indexes, specifies the maximum length, in characters, of a term to include in the TEXT index. Terms that are longer than this setting are ignored when building or refreshing the TEXT index.

The value of MAXIMUM TERM LENGTH must be less than or equal to 60. If you set this option to be lower than MINIMUM TERM LENGTH, the value of MINIMUM TERM LENGTH is automatically adjusted to be the same as the new MAXIMUM TERM LENGTH value.

TERM BREAKER clause – specifies the name of the algorithm to use for separating column values into terms. The choices for IN SYSTEM tables are GENERIC (the default) or NGRAM. The GENERIC algorithm treats any string of one or more alphanumerics, separated by non-alphanumerics, as a term.

The NGRAM algorithm breaks strings into n-grams. An n-gram is an n-character substring of a larger string. The NGRAM term breaker is required for fuzzy (approximate) matching, or for documents that do not use whitespace or non-alphanumeric characters to separate terms. NGRAM is supported for IN SYSTEM tables.

NGRAM term breaker is built on TEXT indexes, so use text configuration object settings to define whether to use an NGRAM or GENERIC TEXT index.

TERM BREAKER can include the specification for the external term breaker library using EXTERNAL NAME and the library entry point.

DROP PREFILTER clause – drops the external prefilter and sets NULL to the prefilter columns in ISYSTEXTCONFIG table.

PREFILTER EXTERNAL NAME clause – specifies the entry_point and the library name of the external pre-filter library provided by external vendors.

Side Effects:
  • Automatic commit.

Permissions

The user must have DBA authority to alter the text configuration object to specify the external libraries and functions for external pre-filter or term-breaker.

All other modifications to the text configuration can be done by either the owner of the configuration object or by a user having DBA authority.