# Displayed attributes
Child route of the settings route.
The fields whose attributes are added to the displayed-attributes list are displayed in each matching document.
By default, all fields are considered to be displayedAttributes. This behavior is represented by the * in the settings. Setting displayedAttributes to an empty array [] will reset the setting to its default value.
Displayed attributes can also be updated directly through the global settings route along with the other settings.
To learn more about displayed attributes, refer to our dedicated guide.
WARNING
Updating the settings means overwriting the default settings of Meilisearch. You can reset to default values using the DELETE routes.
# Get displayed attributes
/indexes/{index_uid}/settings/displayed-attributesGet the displayed attributes of an index. The index uid is required.
# Example
curl \
-X GET 'http://localhost:7700/indexes/movies/settings/displayed-attributes'
# Response: 200 Ok
List the settings.
[
"title",
"overview",
"genres",
"release_date.year"
]
# Update displayed attributes
/indexes/{index_uid}/settings/displayed-attributesUpdate the displayed attributes of an index. The index uid is required.
If an attribute contains an object, you can use dot notation to specify one or more of its keys, e.g., "displayedAttributes": ["release_date.year"].
NOTE
displayedAttributes only impacts search results. It has no effect on other methods of retrieving or copying documents, such as the GET documents endpoint, dumps, or snapshots.
# Body
An array of strings that contains attributes of an index to display.
More information about the body.
# Example
curl \
-X PUT 'http://localhost:7700/indexes/movies/settings/displayed-attributes' \
-H 'Content-Type: application/json' \
--data-binary '[
"title",
"overview",
"genres",
"release_date"
]'
# Response: 202 Accepted
{
"taskUid": 1,
"indexUid": "movies",
"status": "enqueued",
"type": "settingsUpdate",
"enqueuedAt": "2021-08-11T09:25:53.000000Z"
}
You can use this taskUid to get more details on the status of the task.
# Reset displayed attributes
/indexes/{index_uid}/settings/displayed-attributesReset the displayed attributes of the index to the default value. The index uid is required.
# Default value
All attributes found in the documents added to the index.
# Example
curl \
-X DELETE 'http://localhost:7700/indexes/movies/settings/displayed-attributes'
# Response: 202 Accepted
{
"taskUid": 1,
"indexUid": "movies",
"status": "enqueued",
"type": "settingsUpdate",
"enqueuedAt": "2021-08-11T09:25:53.000000Z"
}
You can use this taskUid to get more details on the status of the task.