Index Settings
Configure search behavior for an index. Changes to settings are processed asynchronously and may trigger a re-index of your documents.
GET
/v1/indexes/:uid/settingsGet all settings for an index.
Auth admin or search keyReturns 200
Response
{
"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
}
}PATCH
/v1/indexes/:uid/settingsUpdate settings for an index. Only include the settings you want to change.
Auth admin key onlyReturns 202
Request body
{
"filterableAttributes": ["category", "price"],
"sortableAttributes": ["price", "createdAt"],
"searchableAttributes": ["title", "description"]
}Response
{
"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. |