STOPLIST clause - Configure the stoplist

A stoplist specifies the terms to ignore when creating the text index.

If not defined, the default for this setting is taken from the setting in the default text configuration object, which typically has an empty stoplist.

STOPLIST impact to text index STOPLIST impact to query terms
  • GENERIC text indexes   For GENERIC text indexes, terms that are in the stoplist are not inserted into the text index.

  • NGRAM text index   For NGRAM text indexes, the text index will not contain the n-grams formed from the terms in the stoplist.

  • GENERIC text indexes   For GENERIC text indexes, query terms that are in the stoplist are ignored because they cannot exist in the text index.

  • NGRAM text index   Terms in the stoplist are broken into n-grams and the n-grams are used for the term filtering. Likewise, query terms are broken into n-grams and any that match n-grams in the stoplist are dropped because they cannot exist in the text index.

The settings in the text configuration object are applied to the stoplist when it is parsed. That is, the specified term breaker and the min/max length settings are applied.

Stoplists in NGRAM text indexes can cause unexpected results because the stoplist is stored in n-gram form, and not the stoplist terms you specified. For example, in an NGRAM text index where MAXIMUM TERM LENGTH is 3, if you specify STOPLIST 'there', the following n-grams are stored as the stoplist: the her ere. This impacts the ability to query for any terms that contain the n-grams the, her, and ere.

Note

The same restrictions with regards to specifying string literals also apply to stoplists. For example, apostrophes must be escaped, and so on.

The Samples directory contains sample code that loads stoplists for several languages. These sample stoplists are recommended for use only on GENERIC text indexes. For the location of the Samples directory, see Samples directory.

 See also