{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zincsearch/json-schema/zincsearch-meta-search-response-schema.json",
  "title": "meta.SearchResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zincsearch-search-api-openapi.yml#/components/schemas/meta.SearchResponse",
  "type": "object",
  "properties": {
    "_shards": {
      "$ref": "#/$defs/meta.Shards"
    },
    "aggregations": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/meta.AggregationResponse"
      }
    },
    "error": {
      "type": "string"
    },
    "hits": {
      "$ref": "#/$defs/meta.Hits"
    },
    "timed_out": {
      "type": "boolean"
    },
    "took": {
      "description": "Time it took to generate the response",
      "type": "integer"
    }
  },
  "$defs": {
    "meta.AggregationResponse": {
      "type": "object",
      "properties": {
        "buckets": {
          "description": "slice or map"
        },
        "interval": {
          "description": "support for auto_date_histogram_aggregation",
          "type": "string"
        },
        "value": {}
      }
    },
    "meta.Hit": {
      "type": "object",
      "properties": {
        "@timestamp": {
          "type": "string"
        },
        "_id": {
          "type": "string"
        },
        "_index": {
          "type": "string"
        },
        "_score": {
          "type": "number"
        },
        "_source": {},
        "_type": {
          "type": "string"
        },
        "fields": {
          "type": "object",
          "additionalProperties": true
        },
        "highlight": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "meta.Hits": {
      "type": "object",
      "properties": {
        "hits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/meta.Hit"
          }
        },
        "max_score": {
          "type": "number"
        },
        "total": {
          "$ref": "#/$defs/meta.Total"
        }
      }
    },
    "meta.Shards": {
      "type": "object",
      "properties": {
        "failed": {
          "type": "integer"
        },
        "skipped": {
          "type": "integer"
        },
        "successful": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "meta.Total": {
      "type": "object",
      "properties": {
        "value": {
          "description": "Count of documents returned",
          "type": "integer"
        }
      }
    }
  }
}