Stop-words

The stop-words route lets you add a list of words that will be ignored in search queries. So if you add the as a stop word and you make a search on the mask you will only have matching documents with mask.

Stop-words can also be updated directly through the global settings route along with the other settings.

NOTE

Updating the settings means overwriting the default settings of MeiliSearch. You can reset to default values using the DELETE routes.

Get the stop-words list of an index.

Path Variables

  1. $ curl \
  1. client.index('movies').getStopWords()
  1. client.index('movies').get_stop_words()
  1. $client->index('movies')->getStopWords();
  1. index.stop_words
  1. client.Settings("movies").GetStopWords()
  1. let stop_words: Vec<String> = movies.get_stop_words().await.unwrap();

Response:

  1. ["of", "the", "to"]

POST

Update the list of of an index.

Path Variables

Body

An array of strings that contains the stop-words.

If a list of stop-words already exists it will be overwritten (replaced).

  1. $ curl \
  2. -X POST 'http://localhost:7700/indexes/movies/settings/stop-words' \
  3. --data '["the", "of", "to"]'
  1. client.index('movies').updateStopWords(['of', 'the', 'to'])
  1. client.index('movies').update_stop_words(['of', 'the', 'to'])
  1. $client->index('movies')->updateStopWords(['the', 'of', 'to']);
  1. index.update_stop_words(['of', 'the', 'to'])
  1. stopWords := []string{"of", "the", "to"}
  1. let stop_words = &["of", "the", "to"];
  2. let progress: Progress = movies.set_stop_words(stop_words).await.unwrap();

Response: 202 Accepted

  1. {
  2. }

This updateId allows you to track the current update.

DELETE

Reset the list of of an index to its default value.

Default value

Empty array: []

Path Variables

  1. $ curl \
  2. -X DELETE 'http://localhost:7700/indexes/movies/settings/stop-words'
  1. client.index('movies').resetStopWords()
  1. client.index('movies').reset_stop_words()
  1. $client->index('movies')->resetStopWords();
  1. index.reset_stop_words
  1. client.Settings(indexUID).ResetStopWords()
  1. let progress: Progress = movies.reset_stop_words().await.unwrap();

Response: 202 Accepted

  1. {
  2. "updateId": 1

This updateId allows you to .