Skip to main content

Use Stop Words in the Search Index

Optionally, you can use “stop words” to prevent indexing of commonly used words, such as articles, pronouns and prepositions.

These words will be excluded from search results.

To use stop words you first need to create a stop words file for every language in your search index. This is simply a text file containing one stop word on each line.

To build an index with stop words:

  1. Create a text file named StopWords_<lang>.txt for each language in your deployment.
    Replace <lang> with the relevant two character language code. For example, the English stop words file should be named StopWords_en.txt.

  2. Populate the file with your stop words, one word per line.

  3. Save the file to the MetaDataUtilities directory.

  4. Follow the steps in either Update the Search Index for Single Language Datasets or Update the Search Index for Multilingual Datasets to build your search index.

Make sure you save the stop words file with a suitable file encoding. For example, if the file contains non-ASCII characters such as diacritics/accents then it must be saved in a suitable Unicode encoding, such as UTF-8.

There is a sample stop words file named StopWords.txt located in the MetaDataUtilities directory that you can use as a basis for creating your own stop words file, but this file will not be used by default unless you rename it to have the relevant language code in the filename.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.