Index Settings
Configure search behavior for an index. Changes to settings are processed asynchronously and may trigger a re-index of your documents.
Not every engine applies every setting
On Meilisearch every setting below applies to a live index. Typesense accepts synonyms, searchableAttributes, filterableAttributes and sortableAttributes, and answers any other setting with 400 unsupported_setting. On Typesense the filterable and sortable lists only turn fields on, which is what facets and sorting a string field need. A field can be made sortable only once a document has given it a type: before that the call answers 409 settings_need_documents. Elasticsearch applies typoTolerance.enabled, distinctAttribute and faceting, and answers any other setting that would change the index with 400 unsupported_setting: it searches every field, and filters and sorts on any field without a list (a string field through field.keyword). Sending back the settings you read never fails. See Engine Compatibility.
/v1/indexes/:uid/settingsGet all settings for an index.
{
"searchableAttributes": ["*"],
"filterableAttributes": [],
"sortableAttributes": [],
"rankingRules": [
"words", "typo", "proximity",
"attribute", "sort", "exactness"
],
"synonyms": {},
"stopWords": [],
"displayedAttributes": ["*"],
"distinctAttribute": null,
"typoTolerance": {
"enabled": true,
"minWordSizeForTypos": {
"oneTypo": 5,
"twoTypos": 9
}
},
"faceting": {
"maxValuesPerFacet": 100
},
"pagination": {
"maxTotalHits": 1000
}
}/v1/indexes/:uid/settingsUpdate settings for an index. Only include the settings you want to change.
{
"filterableAttributes": ["category", "price"],
"sortableAttributes": ["price", "createdAt"],
"searchableAttributes": ["title", "description"]
}{
"taskUid": 5,
"indexUid": "products",
"status": "enqueued"
}| Setting | Type | Description |
|---|---|---|
searchableAttributes | string[] | Attributes used for search. Order determines relevance ranking. |
filterableAttributes | string[] | Attributes that can be used in filter expressions. |
sortableAttributes | string[] | Attributes that can be used in sort expressions. |
rankingRules | string[] | Ordered list of ranking rules applied to search results. |
synonyms | object | Map of words to their synonyms, e.g. { "phone": ["mobile", "cell"] }. |
stopWords | string[] | Words ignored during search (e.g. "the", "a", "is"). |
displayedAttributes | string[] | Attributes returned in search results. Defaults to all. |
distinctAttribute | string|null | De-duplicate results by this attribute. |
typoTolerance | object | Configure typo tolerance behavior and thresholds. |
faceting | object | Configure facet behavior (e.g. maxValuesPerFacet). |
pagination | object | Configure pagination limits (e.g. maxTotalHits). |
embedders | object | Configure vector embedders for hybrid/semantic search. |
On a Visor index, searchableAttributes, filterableAttributes, sortableAttributes, displayedAttributes, rankingRules (the built-in rules only), synonyms, stopWords and typoTolerance apply to the live index. Visor refuses distinctAttribute, faceting, pagination, embedders, proximityPrecision, searchCutoffMs and the token settings with 400 feature_not_supported, so a setting never looks applied when it is not. Sending null for one of them is accepted and changes nothing.