Skip to content

Stopwords

A stopword is a commonly used word that is often ignored when performing a search. These words occur frequently and typically do not contribute meaningful context to a search query so they are often removed to improve search relevance. Searchcraft comes with multiple, language-specific pre-built dictionaries that pilots may utilize or you can create and manage your own. If you are a Searchcraft Cloud customer, these are managed through the Vektron UI. For self-hosted customers, these are managed via the API.

API Endpoints

  • GET /index/:index/stopwords Returns the stopwords for an index.
  • POST /index/:index/stopwords Add stopwords to an index.
  • DELETE /index/:index/stopwords Delete an array of stopwords from an index.
  • DELETE /index/:index/stopwords/all Delete all stopwords from an index.
    • No payload is required.

Stopwords will only be applied to queries if they are enabled on the schema definition.

Note that if you are using the default dictionaries, the POST and DELETE operations will have no effect, you may only enable/disable stopwords. The delete operations only take effect if you have added a custom set of stopwords.

Auth Requirement

Requires an authentication key that has ingestion permissions.

Request Examples

Add Stopwords

POST /index/:index/stopwords expects an array with one to many stopwords.

Terminal window
curl -X POST -H "Content-Type: application/json" -H "Authorization: read-key-value" --data '["totallyuniquestopword", "totallyuniquestopword2"]' https://searchcraft-cluster-url/index/:index/stopwords

Delete An Array of Stopword Values

Terminal window
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: read-key-value" --data '["totallyuniquestopword", "totallyuniquestopword2"]' https://searchcraft-cluster-url/index/:index/stopwords

English Examples of Stop Words

  • Articles: the, a, an
  • Conjunctions: and, or, but
  • Prepositions: in, on, at, to, with
  • Pronouns: he, she, it, they

Available Stopword Dictionaries

Searchcraft currently supports stopword dictionaries for the following languages. More will be added over time.

Languagecode
Arabicar
Chinesezh
Danishda
Dutchnl
Englishen
Finnishfi
Frenchfr
Germande
Greekel
Hebrewhe
Italianit
Norwegianno
Portuguesept
Romanianro
Russianru
Spanishes
Swedishsv
Tamilta
Turkishtr

If stop word stripping is enabled and a language was not set, Searchcraft will default to the English stopword dictionary.