> ## Documentation Index
> Fetch the complete documentation index at: https://www.meilisearch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure stop words

> Set up stop words to ignore common terms like "the", "a", and "is" during search, improving both performance and relevance.

Stop words are common terms that appear in nearly every document and add little value to search relevancy. Words like "the", "is", "at", and "of" are typical examples. Configuring stop words tells Meilisearch to ignore these terms during [indexing](/capabilities/indexing/overview) and searching, which improves both query speed and result quality.

## Why configure stop words

Without stop words, a search for `the lord of the rings` treats every word equally. The words "the" and "of" match nearly every document, diluting the relevancy of the more meaningful terms "lord" and "rings". By marking "the" and "of" as stop words, Meilisearch focuses on the terms that actually matter.

Stop words also improve search performance. Since these common words appear in many documents, ignoring them reduces the number of comparisons Meilisearch needs to make during each query.

## Check current stop words

Retrieve the current stop words for an index:

<CodeGroup>
  ```bash cURL theme={null}
  curl \
    -X GET 'MEILISEARCH_URL/indexes/movies/settings/stop-words'
  ```

  ```javascript JS theme={null}
  client.index('movies').getStopWords()
  ```

  ```python Python theme={null}
  client.index('movies').get_stop_words()
  ```

  ```php PHP theme={null}
  $client->index('movies')->getStopWords();
  ```

  ```java Java theme={null}
  client.index("movies").getStopWordsSettings();
  ```

  ```ruby Ruby theme={null}
  client.index('movies').stop_words
  ```

  ```go Go theme={null}
  client.Index("movies").GetStopWords()
  ```

  ```csharp C# theme={null}
  await client.Index("movies").GetStopWordsAsync();
  ```

  ```rust Rust theme={null}
  let stop_words: Vec<String> = client
    .index("movies")
    .get_stop_words()
    .await
    .unwrap();
  ```

  ```swift Swift theme={null}
  client.index("movies").getStopWords { (result) in
      switch result {
      case .success(let stopWords):
          print(stopWords)
      case .failure(let error):
          print(error)
      }
  }
  ```

  ```dart Dart theme={null}
  await client.index('movies').getStopWords();
  ```
</CodeGroup>

By default, the response is an empty array `[]`, meaning no stop words are configured.

## Update stop words

Set a list of stop words for an index. Here is an example with common English stop words:

<CodeGroup>
  ```bash cURL theme={null}
  curl \
    -X PUT 'MEILISEARCH_URL/indexes/movies/settings/stop-words' \
    -H 'Content-Type: application/json' \
    --data-binary '[
      "the",
      "of",
      "to"
    ]'
  ```

  ```javascript JS theme={null}
  client.index('movies').updateStopWords(['of', 'the', 'to'])
  ```

  ```python Python theme={null}
  client.index('movies').update_stop_words(['of', 'the', 'to'])
  ```

  ```php PHP theme={null}
  $client->index('movies')->updateStopWords(['the', 'of', 'to']);
  ```

  ```java Java theme={null}
  client.index("movies").updateStopWordsSettings(new String[] {"of", "the", "to"});
  ```

  ```ruby Ruby theme={null}
  client.index('movies').update_stop_words(['of', 'the', 'to'])
  ```

  ```go Go theme={null}
  stopWords := []string{"of", "the", "to"}
  client.Index("movies").UpdateStopWords(&stopWords)
  ```

  ```csharp C# theme={null}
  await client.Index("movies").UpdateStopWordsAsync(new[] {"of", "the", "to"});
  ```

  ```rust Rust theme={null}
  let stop_words = ["of", "the", "to"];
  let task: TaskInfo = client
    .index("movies")
    .set_stop_words(&stop_words)
    .await
    .unwrap();
  ```

  ```swift Swift theme={null}
  let stopWords: [String] = ["of", "the", "to"]
  client.index("movies").updateStopWords(stopWords) { (result) in
      switch result {
      case .success(let task):
          print(task)
      case .failure(let error):
          print(error)
      }
  }
  ```

  ```dart Dart theme={null}
  await client.index('movies').updateStopWords(['of', 'the', 'to']);
  ```
</CodeGroup>

<Warning>
  Updating stop words triggers a re-indexing of all documents in the index. This is an [asynchronous](/capabilities/indexing/tasks_and_batches/async_operations) operation. Use the [task API](/reference/api/tasks/get-all-tasks) to monitor progress.
</Warning>

### Common English stop words

Here is a more comprehensive list you can use as a starting point for English-language datasets:

<CodeGroup>
  ```json theme={null}
  [
    "a", "an", "and", "are", "as", "at", "be", "but", "by",
    "for", "if", "in", "into", "is", "it", "no", "not", "of",
    "on", "or", "such", "that", "the", "their", "then", "there",
    "these", "they", "this", "to", "was", "will", "with"
  ]
  ```
</CodeGroup>

Adapt this list to your dataset and language. For example, French datasets might include words like "le", "la", "les", "de", "du", "des".

If your application serves multiple languages, the recommended approach is to create a separate index per language and configure language-specific stop words for each index. This avoids situations where a stop word in one language is a meaningful term in another (for example, "die" is a stop word in German but a meaningful English word).

### Important considerations

* **Stop words are index-specific.** Each index has its own stop word list. If you have multiple indexes with different languages, configure appropriate stop words for each one.
* **Stop words are case-insensitive.** Adding `"The"` is equivalent to adding `"the"`.
* **Stop words affect indexing.** Meilisearch removes stop words from the index, so changing this setting requires re-indexing.

## Reset stop words

Remove all stop words and return to the default behavior:

<CodeGroup>
  ```bash cURL theme={null}
  curl \
    -X DELETE 'MEILISEARCH_URL/indexes/movies/settings/stop-words'
  ```

  ```javascript JS theme={null}
  client.index('movies').resetStopWords()
  ```

  ```python Python theme={null}
  client.index('movies').reset_stop_words()
  ```

  ```php PHP theme={null}
  $client->index('movies')->resetStopWords();
  ```

  ```java Java theme={null}
  client.index("movies").resetStopWordsSettings();
  ```

  ```ruby Ruby theme={null}
  client.index('movies').reset_stop_words
  ```

  ```go Go theme={null}
  client.Index("movies").ResetStopWords()
  ```

  ```csharp C# theme={null}
  await client.Index("movies").ResetStopWordsAsync();
  ```

  ```rust Rust theme={null}
  let task: TaskInfo = client
    .index("movies")
    .reset_stop_words()
    .await
    .unwrap();
  ```

  ```swift Swift theme={null}
  client.index("movies").resetStopWords { (result) in
      switch result {
      case .success(let task):
          print(task)
      case .failure(let error):
          print(error)
      }
  }
  ```

  ```dart Dart theme={null}
  await client.index('movies').resetStopWords();
  ```
</CodeGroup>

After resetting, Meilisearch treats all words as meaningful during indexing and searching.

## Effect on phrase search

Stop words are also ignored inside [phrase searches](/capabilities/full_text_search/getting_started/phrase_search). If "the" is a stop word, searching for `"the great gatsby"` effectively matches the same documents as searching for `"great gatsby"`, because "the" is removed from the query.

<Info>
  For the full API reference, see [get stop words](/reference/api/settings/get-stopwords).
</Info>
