Update typo tolerance settings
PATCH
/indexes/{indexUid}/settings/typo-tolerance
Update the typo tolerance configuration of an index.
If the provided index does not exist, it will be created.
Headers
-
Content-Type string Required
Payload content-type
Value is
application/json
.
Path parameters
-
indexUid string Required
Index Unique Identifier
Body Required
-
enabled boolean
Enable the typo tolerance feature.
Default value is
true
. -
disableOnAttributes array[string]
Disable the typo tolerance feature on the specified attributes.
Default value is
[]
(empty). -
disableOnWords array[string]
Disable the typo tolerance feature for a set of query terms given for a search query.
Default value is
[]
(empty). -
minWordSizeForTypos object
PATCH /indexes/{indexUid}/settings/typo-tolerance
curl \
-X PATCH https://example.meilisearch.com:7700/indexes/movies/settings/typo-tolerance \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled":true,"disableOnAttributes":[],"disableOnWords":[],"minWordSizeForTypos":{"oneTypo":5,"twoTypos":9}}'
Request example
# Headers
Content-Type: application/json
# Payload
{
"enabled": true,
"disableOnAttributes": [],
"disableOnWords": [],
"minWordSizeForTypos": {
"oneTypo": 5,
"twoTypos": 9
}
}
Response examples (202)
{
"taskUid": 0,
"indexUid": "movies",
"status": "enqueued",
"type": "settingsUpdate",
"enqueuedAt": "2021-01-01T09:39:00.000000Z"
}
Response examples (401)
{
"message": "The Authorization header is missing. It must use the bearer authorization method.",
"code": "missing_authorization_header",
"type": "auth",
"link": "https://docs.meilisearch.com/errors#missing_authorization_header"
}