Synonyms, Stopwords and Protwords

Three plain text lists that tune your words

Three word lists

Three plain text files tune how your Opensolr Index treats words: which ones mean the same, which ones to ignore and which ones to leave untouched.

01 · synonyms.txt

Words that mean the same. A search for one finds documents with the others. One group per line:

# a search for any of them finds all of them
sofa, couch, settee

# a search for the left side finds the right side
tv, telly => television

02 · stopwords.txt

Words so common that they are left out of searches. One word per line:

the
of
and

03 · protwords.txt

Words that stemming must not change, such as brand names and product codes. One word per line:

Opensolr
XR500

04 · Edit them

  1. Open the control panel of the index and click Configuration.
  2. Pick the file under Edit Config File, change it and save. The index reloads by itself: Edit a file.

Lines that start with # are comments.

05 · Good to know

  • A list works only for fields whose type in schema.xml uses it. The configuration files page explains how the files fit together.
  • If your schema applies a list while documents are indexed, documents already in the index keep the old words until you send them again.

Configuration