Update distinct attribute
Update the distinct attribute field of an index.
If the provided index does not exist, it will be created.
Headers
-
Payload content-type
Value is
application/json
.
Path parameters
-
Index Unique Identifier
Body Required
string | null
string | null
Search returns documents with distinct (different) values of the given field.
PUT /indexes/{indexUid}/settings/distinct-attribute
curl \
-X PUT https://example.meilisearch.com:7700/indexes/movies/settings/distinct-attribute \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '"string"'
Request example
# Headers
Content-Type: application/json
# Payload
"string"
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"
}