Skip to content

Latest commit

 

History

History
100 lines (60 loc) · 2.69 KB

displayed_attributes.md

File metadata and controls

100 lines (60 loc) · 2.69 KB

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.

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

Learn more about displayed fields.

Get displayed attributes

Get the displayed attributes of an index.

Path Variables

Variable Description
index_uid The index UID

Example

Response: 200 Ok

List the settings.

["title", "description", "genre", "release_date"]

Update displayed attributes

Update the displayed attributes of an index.

Path Variables

Variable Description
index_uid The index UID

Body

An array of strings that contains attributes of an index to display.

More information about the body.

Example

Response: 202 Accepted

{
  "updateId": 1
}

This updateId allows you to track the current update.

Reset displayed attributes

Reset the displayed attributes of the index to the default value.

Default value

All attributes found in the documents added to the index.

Path Variables

Variable Description
index_uid The index UID

Example

Response: 202 Accepted

{
  "updateId": 1
}

This updateId allows you to track the current update.