Typesense · JSON Structure

Typesense Search Result Structure

Structural definition of a Typesense search response

Type: object Properties: 9
Full-Text SearchOpen SourceSearch EngineTypo ToleranceVector Search

Typesense Search Result Structure is a JSON Structure definition published by Typesense, describing 9 properties. It conforms to the https://json-schema.org/draft/2020-12/schema meta-schema.

Properties

found found_docs out_of page search_time_ms hits facet_counts request_params search_cutoff

Meta-schema: https://json-schema.org/draft/2020-12/schema

JSON Structure

Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Typesense Search Result Structure",
  "description": "Structural definition of a Typesense search response",
  "type": "object",
  "properties": {
    "found": {
      "type": "integer",
      "description": "Total number of matching documents"
    },
    "found_docs": {
      "type": "integer",
      "description": "Total number of unique documents in the result"
    },
    "out_of": {
      "type": "integer",
      "description": "Total number of documents in the collection"
    },
    "page": {
      "type": "integer",
      "description": "Current page number"
    },
    "search_time_ms": {
      "type": "integer",
      "description": "Time taken to execute the search in milliseconds"
    },
    "hits": {
      "type": "array",
      "description": "List of matching document results",
      "items": {
        "type": "object",
        "properties": {
          "document": {
            "type": "object",
            "description": "The matched document"
          },
          "highlight": {
            "type": "object",
            "description": "Highlighted snippets for matching fields"
          },
          "text_match": {
            "type": "integer",
            "description": "Numeric text match score"
          }
        }
      }
    },
    "facet_counts": {
      "type": "array",
      "description": "Facet aggregation results",
      "items": {
        "type": "object",
        "properties": {
          "field_name": {"type": "string"},
          "counts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {"type": "string"},
                "count": {"type": "integer"},
                "highlighted": {"type": "string"}
              }
            }
          }
        }
      }
    },
    "request_params": {
      "type": "object",
      "description": "Echo of the original request parameters"
    },
    "search_cutoff": {
      "type": "boolean",
      "description": "Whether results were cut off to meet latency requirements"
    }
  }
}