Update Filterable Attributes
PUT
/indexes/{indexUid}/settings/filterable-attributes
Update the filterable attributes of an index.
In order to enable filtering capabilities on geographic data, the _geo
field must be added as a filterableAttribute.
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
array[string]
array[string]
Attributes to use for faceting and filtering. See Filtering and Faceted Search.
PUT /indexes/{indexUid}/settings/filterable-attributes
curl \
-X PUT https://example.meilisearch.com:7700/indexes/movies/settings/filterable-attributes \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '["genres","director"]'
Request example
# Headers
Content-Type: application/json
# Payload
[
"genres",
"director"
]
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"
}