Get faceting configuration

GET /indexes/{indexUid}/settings/faceting

Get the faceting configuration of an index.

Path parameters

  • indexUid string Required

    Index Unique Identifier

Responses

  • 200 application/json

    Ok

    Hide response attributes Show response attributes object
    • Define maximum number of value returned for a facet for a search query. It means that with the default value of 100, it is not possible to have 101 different colors if the color` field is defined as a facet at search time.

      Default value is 100.

    • Defines how facet values are sorted. By default, all facets (*) are sorted by name, alphanumerically in ascending order (alpha). count sorts facet values by the number of documents containing a facet value in descending order.

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
  • 404

    Not Found

GET /indexes/{indexUid}/settings/faceting
curl \
 -X GET https://example.meilisearch.com:7700/indexes/movies/settings/faceting \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "maxValuesPerFacet": 100,
  "sortFacetValuesBy": {
    "*": "alpha",
    "genres": "count"
  }
}
Response examples (401)
{
  "message": "The Authorization header is missing. It must use the bearer authorization method.",
  "code": "missing_authorization_header",
  "type": "auth",
  "link": "https://docs.meilisearch.com/errors#missing_authorization_header"
}