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/settings

Get 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/settings

Update 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"
}
SettingTypeDescription
searchableAttributesstring[]Attributes used for search. Order determines relevance ranking.
filterableAttributesstring[]Attributes that can be used in filter expressions.
sortableAttributesstring[]Attributes that can be used in sort expressions.
rankingRulesstring[]Ordered list of ranking rules applied to search results.
synonymsobjectMap of words to their synonyms, e.g. { "phone": ["mobile", "cell"] }.
stopWordsstring[]Words ignored during search (e.g. "the", "a", "is").
displayedAttributesstring[]Attributes returned in search results. Defaults to all.
distinctAttributestring|nullDe-duplicate results by this attribute.
typoToleranceobjectConfigure typo tolerance behavior and thresholds.
facetingobjectConfigure facet behavior (e.g. maxValuesPerFacet).
paginationobjectConfigure pagination limits (e.g. maxTotalHits).
embeddersobjectConfigure vector embedders for hybrid/semantic search.