Typesense · Schema

FacetCounts

Full-Text SearchOpen SourceSearch EngineTypo ToleranceVector Search

Properties

Name Type Description
field_name string Name of the faceted field.
counts array Array of facet value counts.
stats object Statistics for numeric faceted fields.
View JSON Schema on GitHub

JSON Schema

typesense-facetcounts-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/FacetCounts",
  "title": "FacetCounts",
  "type": "object",
  "properties": {
    "field_name": {
      "type": "string",
      "description": "Name of the faceted field."
    },
    "counts": {
      "type": "array",
      "description": "Array of facet value counts.",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of documents with this facet value."
          },
          "highlighted": {
            "type": "string",
            "description": "Highlighted facet value."
          },
          "value": {
            "type": "string",
            "description": "Facet value."
          }
        }
      }
    },
    "stats": {
      "type": "object",
      "description": "Statistics for numeric faceted fields.",
      "properties": {
        "min": {
          "type": "number"
        },
        "max": {
          "type": "number"
        },
        "sum": {
          "type": "number"
        },
        "avg": {
          "type": "number"
        },
        "total_values": {
          "type": "integer"
        }
      }
    }
  }
}