Minimum Term Length Setting (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.

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

MINIMUM TERM LENGTH impact
To TEXT index To query terms
  • GENERIC TEXT index – for GENERIC TEXT indexes, the TEXT index will not contain words shorter than MINIMUM TERM LENGTH.
  • 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 – for NGRAM TEXT indexes, this setting is ignored.
  • NGRAM TEXT index – the MINIMUM TERM LENGTH setting has no impact on full text queries on NGRAM TEXT indexes.