# Stop-words

Child route of the settings route.

The stop-words route allows you to add a list of words ignored in your search queries. During a search, the stop words contained in your search query will be ignored by the sorting algorithm.

When you add a common English word such as the to the stop-words list, MeiliSearch will not take it into consideration when calculating how relevant a result is.

NOTE

Stop-words are strongly related to the language used in your dataset. For example, most datasets containing English documents will have countless occurrences of the and of. Italian datasets, instead, will benefit from ignoring words like a, la, or il.

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

WARNING

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

# Get stop-words

GET
/indexes/:index_uid/settings/stop-words

Get the stop-words list of an index.

# Path variables

Variable Description
index_uid The index UID

# Example

curl \
  -X GET 'http://localhost:7700/indexes/movies/settings/stop-words'

# Response: 200 Ok

[
  "of",
  "the",
  "to"
]

# Update stop-words

POST
/indexes/:index_uid/settings/stop-words

Update the list of stop-words of an index.

# Path variables

Variable Description
index_uid The index UID

# Body

An array of strings that contains the stop-words.

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

More information about the body.

# Example

curl \
  -X POST 'http://localhost:7700/indexes/movies/settings/stop-words' \
  -H 'Content-Type: application/json' \
  --data-binary '["the", "of", "to"]'

# Response: 202 Accepted

{
    "uid": 1,
    "indexUid": "movies",
    "status": "enqueued",
    "type": "settingsUpdate",
    "enqueuedAt": "2021-08-11T09:25:53.000000Z"
}

You can use this uid to get more details on the status of the task.

# Reset stop-words

DELETE
/indexes/:index_uid/settings/stop-words

Reset the list of stop-words of an index to its default value.

# Default value

Empty array: []

# Path variables

Variable Description
index_uid The index UID

# Example

curl \
  -X DELETE 'http://localhost:7700/indexes/movies/settings/stop-words'

# Response: 202 Accepted

{
    "uid": 1,
    "indexUid": "movies",
    "status": "enqueued",
    "type": "settingsUpdate",
    "enqueuedAt": "2021-08-11T09:25:53.000000Z"
}

You can use this uid to get more details on the status of the task.