Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » SQL Anywhere Server - SQL Usage » Query and modify data » Full text search » Text configuration object concepts and reference » What to specify when creating or altering text configuration objects


MINIMUM TERM LENGTH clause - Set the minimum term length

The MINIMUM TERM LENGTH setting specifies the minimum length, in characters, for terms inserted in the index or searched for in a full text query. MINIMUM TERM LENGTH is not relevant for NGRAM text indexes.

MINIMUM TERM LENGTH has special implications on prefix searching.

The value of MINIMUM TERM LENGTH must be greater than 0. If you set it higher than MAXIMUM TERM LENGTH, then MAXIMUM TERM LENGTH is automatically adjusted to be equal to MINIMUM TERM LENGTH.

If not defined, the default for MINIMUM TERM LENGTH is taken from the setting in the default text configuration object, which is typically 1.

The following table explains the impact that the value of MINIMUM TERM LENGTH has on text indexing and on how query strings are handled:

Text indexes Query strings
  • GENERIC text index   For GENERIC text indexes, the text index will not contain words shorter than MINIMUM TERM LENGTH.

  • NGRAM text index   For NGRAM text indexes, this setting is ignored.

  • GENERIC text index   When querying a GENERIC text index, query terms shorter than MINIMUM TERM LENGTH are ignored because they cannot exist in the text index.

  • NGRAM text index   The MINIMUM TERM LENGTH setting has no impact on full text queries on NGRAM text indexes.

 See also