_types.query_dsl.QueryContainer
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
Properties
| Name | Type | Description |
|---|---|---|
| bool | object | matches documents matching boolean combinations of other queries. |
| boosting | object | Returns documents matching a `positive` query while reducing the relevance score of documents that also match a `negative` query. |
| common | object | |
| combined_fields | object | The `combined_fields` query supports searching multiple text fields as if their contents had been indexed into one combined field. |
| constant_score | object | Wraps a filter query and returns every matching document with a relevance score equal to the `boost` parameter value. |
| dis_max | object | Returns documents matching one or more wrapped queries, called query clauses or clauses. If a returned document matches multiple query clauses, the `dis_max` query assigns the document the highest rel |
| distance_feature | object | Boosts the relevance score of documents closer to a provided origin date or point. For example, you can use this query to give more weight to documents closer to a certain date or location. |
| exists | object | Returns documents that contain an indexed value for a field. |
| function_score | object | The `function_score` enables you to modify the score of documents that are retrieved by a query. |
| fuzzy | object | Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance. |
| geo_bounding_box | object | Matches geo_point and geo_shape values that intersect a bounding box. |
| geo_distance | object | Matches `geo_point` and `geo_shape` values within a given distance of a geopoint. |
| geo_grid | object | Matches `geo_point` and `geo_shape` values that intersect a grid cell from a GeoGrid aggregation. |
| geo_polygon | object | |
| geo_shape | object | Filter documents indexed using either the `geo_shape` or the `geo_point` type. |
| has_child | object | Returns parent documents whose joined child documents match a provided query. |
| has_parent | object | Returns child documents whose joined parent document matches a provided query. |
| ids | object | Returns documents based on their IDs. This query uses document IDs stored in the `_id` field. |
| intervals | object | Returns documents based on the order and proximity of matching terms. |
| knn | object | Finds the k nearest vectors to a query vector, as measured by a similarity metric. knn query finds nearest vectors through approximate search on indexed dense_vectors. |
| match | object | Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching. |
| match_all | object | Matches all documents, giving them all a `_score` of 1.0. |
| match_bool_prefix | object | Analyzes its input and constructs a `bool` query from the terms. Each term except the last is used in a `term` query. The last term is used in a prefix query. |
| match_none | object | Matches no documents. |
| match_phrase | object | Analyzes the text and creates a phrase query out of the analyzed text. |
| match_phrase_prefix | object | Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term. |
| more_like_this | object | Returns documents that are "like" a given set of documents. |
| multi_match | object | Enables you to search for a provided text, number, date or boolean value across multiple fields. The provided text is analyzed before matching. |
| nested | object | Wraps another query to search nested fields. If an object matches the search, the nested query returns the root parent document. |
| parent_id | object | Returns child documents joined to a specific parent document. |
| percolate | object | Matches queries stored in an index. |
| pinned | object | Promotes selected documents to rank higher than those matching a given query. |
| prefix | object | Returns documents that contain a specific prefix in a provided field. |
| query_string | object | Returns documents based on a provided query string, using a parser with a strict syntax. |
| range | object | Returns documents that contain terms within a provided range. |
| rank_feature | object | Boosts the relevance score of documents based on the numeric value of a `rank_feature` or `rank_features` field. |
| regexp | object | Returns documents that contain terms matching a regular expression. |
| rule | object | |
| script | object | Filters documents based on a provided script. The script query is typically used in a filter context. |
| script_score | object | Uses a script to provide a custom score for returned documents. |
| semantic | object | A semantic query to semantic_text field types |
| shape | object | Queries documents that contain fields indexed using the `shape` type. |
| simple_query_string | object | Returns documents based on a provided query string, using a parser with a limited but fault-tolerant syntax. |
| span_containing | object | Returns matches which enclose another span query. |
| span_field_masking | object | Wrapper to allow span queries to participate in composite single-field span queries by _lying_ about their search field. |
| span_first | object | Matches spans near the beginning of a field. |
| span_multi | object | Allows you to wrap a multi term query (one of `wildcard`, `fuzzy`, `prefix`, `range`, or `regexp` query) as a `span` query, so it can be nested. |
| span_near | object | Matches spans which are near one another. You can specify `slop`, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order. |
| span_not | object | Removes matches which overlap with another span query or which are within x tokens before (controlled by the parameter `pre`) or y tokens after (controlled by the parameter `post`) another span query. |
| span_or | object | Matches the union of its span clauses. |
| span_term | object | Matches spans containing a term. |
| span_within | object | Returns matches which are enclosed inside another span query. |
| sparse_vector | object | Using input query vectors or a natural language processing model to convert a query into a list of token-weight pairs, queries against a sparse vector field. |
| term | object | Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization. |
| terms | object | Returns documents that contain one or more exact terms in a provided field. To return a document, one or more terms must exactly match a field value, including whitespace and capitalization. |
| terms_set | object | Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including whitespace and capit |
| text_expansion | object | Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field. |
| weighted_tokens | object | Supports returning text_expansion query results by sending in precomputed tokens with the query. |
| wildcard | object | Returns documents that contain terms matching a wildcard pattern. |
| wrapper | object | A query that accepts any other query as base64 encoded string. |
| type | object |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/elastic/json-schema/elastic-types-query-dsl-query-container-schema.json",
"title": "_types.query_dsl.QueryContainer",
"description": "An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.",
"x-generated": "2026-11-10",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/elastic-indices-api-openapi.yml#/components/schemas/_types.query_dsl.QueryContainer",
"type": "object",
"properties": {
"bool": {
"description": "matches documents matching boolean combinations of other queries.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.BoolQuery"
}
]
},
"boosting": {
"description": "Returns documents matching a `positive` query while reducing the relevance score of documents that also match a `negative` query.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.BoostingQuery"
}
]
},
"common": {
"deprecated": true,
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.CommonTermsQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"combined_fields": {
"description": "The `combined_fields` query supports searching multiple text fields as if their contents had been indexed into one combined field.",
"x-state": "Generally available; Added in 7.13.0",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.CombinedFieldsQuery"
}
]
},
"constant_score": {
"description": "Wraps a filter query and returns every matching document with a relevance score equal to the `boost` parameter value.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.ConstantScoreQuery"
}
]
},
"dis_max": {
"description": "Returns documents matching one or more wrapped queries, called query clauses or clauses.\nIf a returned document matches multiple query clauses, the `dis_max` query assigns the document the highest relevance score from any matching clause, plus a tie breaking increment for any additional matching subqueries.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.DisMaxQuery"
}
]
},
"distance_feature": {
"description": "Boosts the relevance score of documents closer to a provided origin date or point.\nFor example, you can use this query to give more weight to documents closer to a certain date or location.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.DistanceFeatureQuery"
}
]
},
"exists": {
"description": "Returns documents that contain an indexed value for a field.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.ExistsQuery"
}
]
},
"function_score": {
"description": "The `function_score` enables you to modify the score of documents that are retrieved by a query.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.FunctionScoreQuery"
}
]
},
"fuzzy": {
"description": "Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.FuzzyQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"geo_bounding_box": {
"description": "Matches geo_point and geo_shape values that intersect a bounding box.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.GeoBoundingBoxQuery"
}
]
},
"geo_distance": {
"description": "Matches `geo_point` and `geo_shape` values within a given distance of a geopoint.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.GeoDistanceQuery"
}
]
},
"geo_grid": {
"description": "Matches `geo_point` and `geo_shape` values that intersect a grid cell from a GeoGrid aggregation.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.GeoGridQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"geo_polygon": {
"deprecated": true,
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.GeoPolygonQuery"
}
]
},
"geo_shape": {
"description": "Filter documents indexed using either the `geo_shape` or the `geo_point` type.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.GeoShapeQuery"
}
]
},
"has_child": {
"description": "Returns parent documents whose joined child documents match a provided query.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.HasChildQuery"
}
]
},
"has_parent": {
"description": "Returns child documents whose joined parent document matches a provided query.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.HasParentQuery"
}
]
},
"ids": {
"description": "Returns documents based on their IDs.\nThis query uses document IDs stored in the `_id` field.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.IdsQuery"
}
]
},
"intervals": {
"description": "Returns documents based on the order and proximity of matching terms.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.IntervalsQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"knn": {
"description": "Finds the k nearest vectors to a query vector, as measured by a similarity\nmetric. knn query finds nearest vectors through approximate search on indexed\ndense_vectors.",
"allOf": [
{
"$ref": "#/$defs/_types.KnnQuery"
}
]
},
"match": {
"description": "Returns documents that match a provided text, number, date or boolean value.\nThe provided text is analyzed before matching.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.MatchQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"match_all": {
"description": "Matches all documents, giving them all a `_score` of 1.0.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.MatchAllQuery"
}
]
},
"match_bool_prefix": {
"description": "Analyzes its input and constructs a `bool` query from the terms.\nEach term except the last is used in a `term` query.\nThe last term is used in a prefix query.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.MatchBoolPrefixQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"match_none": {
"description": "Matches no documents.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.MatchNoneQuery"
}
]
},
"match_phrase": {
"description": "Analyzes the text and creates a phrase query out of the analyzed text.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.MatchPhraseQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"match_phrase_prefix": {
"description": "Returns documents that contain the words of a provided text, in the same order as provided.\nThe last term of the provided text is treated as a prefix, matching any words that begin with that term.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.MatchPhrasePrefixQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"more_like_this": {
"description": "Returns documents that are \"like\" a given set of documents.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.MoreLikeThisQuery"
}
]
},
"multi_match": {
"description": "Enables you to search for a provided text, number, date or boolean value across multiple fields.\nThe provided text is analyzed before matching.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.MultiMatchQuery"
}
]
},
"nested": {
"description": "Wraps another query to search nested fields.\nIf an object matches the search, the nested query returns the root parent document.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.NestedQuery"
}
]
},
"parent_id": {
"description": "Returns child documents joined to a specific parent document.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.ParentIdQuery"
}
]
},
"percolate": {
"description": "Matches queries stored in an index.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.PercolateQuery"
}
]
},
"pinned": {
"description": "Promotes selected documents to rank higher than those matching a given query.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.PinnedQuery"
}
]
},
"prefix": {
"description": "Returns documents that contain a specific prefix in a provided field.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.PrefixQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"query_string": {
"description": "Returns documents based on a provided query string, using a parser with a strict syntax.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.QueryStringQuery"
}
]
},
"range": {
"description": "Returns documents that contain terms within a provided range.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.RangeQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"rank_feature": {
"description": "Boosts the relevance score of documents based on the numeric value of a `rank_feature` or `rank_features` field.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.RankFeatureQuery"
}
]
},
"regexp": {
"description": "Returns documents that contain terms matching a regular expression.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.RegexpQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"rule": {
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.RuleQuery"
}
]
},
"script": {
"description": "Filters documents based on a provided script.\nThe script query is typically used in a filter context.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.ScriptQuery"
}
]
},
"script_score": {
"description": "Uses a script to provide a custom score for returned documents.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.ScriptScoreQuery"
}
]
},
"semantic": {
"description": "A semantic query to semantic_text field types",
"x-state": "Generally available; Added in 8.15.0",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SemanticQuery"
}
]
},
"shape": {
"description": "Queries documents that contain fields indexed using the `shape` type.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.ShapeQuery"
}
]
},
"simple_query_string": {
"description": "Returns documents based on a provided query string, using a parser with a limited but fault-tolerant syntax.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SimpleQueryStringQuery"
}
]
},
"span_containing": {
"description": "Returns matches which enclose another span query.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SpanContainingQuery"
}
]
},
"span_field_masking": {
"description": "Wrapper to allow span queries to participate in composite single-field span queries by _lying_ about their search field.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SpanFieldMaskingQuery"
}
]
},
"span_first": {
"description": "Matches spans near the beginning of a field.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SpanFirstQuery"
}
]
},
"span_multi": {
"description": "Allows you to wrap a multi term query (one of `wildcard`, `fuzzy`, `prefix`, `range`, or `regexp` query) as a `span` query, so it can be nested.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SpanMultiTermQuery"
}
]
},
"span_near": {
"description": "Matches spans which are near one another.\nYou can specify `slop`, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SpanNearQuery"
}
]
},
"span_not": {
"description": "Removes matches which overlap with another span query or which are within x tokens before (controlled by the parameter `pre`) or y tokens after (controlled by the parameter `post`) another span query.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SpanNotQuery"
}
]
},
"span_or": {
"description": "Matches the union of its span clauses.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SpanOrQuery"
}
]
},
"span_term": {
"description": "Matches spans containing a term.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.SpanTermQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"span_within": {
"description": "Returns matches which are enclosed inside another span query.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SpanWithinQuery"
}
]
},
"sparse_vector": {
"description": "Using input query vectors or a natural language processing model to convert a query into a list of token-weight pairs, queries against a sparse vector field.",
"x-state": "Generally available; Added in 8.15.0",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.SparseVectorQuery"
}
]
},
"term": {
"description": "Returns documents that contain an exact term in a provided field.\nTo return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.TermQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"terms": {
"description": "Returns documents that contain one or more exact terms in a provided field.\nTo return a document, one or more terms must exactly match a field value, including whitespace and capitalization.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.TermsQuery"
}
]
},
"terms_set": {
"description": "Returns documents that contain a minimum number of exact terms in a provided field.\nTo return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.TermsSetQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"text_expansion": {
"deprecated": true,
"description": "Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.",
"x-state": "Generally available; Added in 8.8.0",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.TextExpansionQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"weighted_tokens": {
"deprecated": true,
"description": "Supports returning text_expansion query results by sending in precomputed tokens with the query.",
"x-state": "Generally available; Added in 8.13.0",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.WeightedTokensQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"wildcard": {
"description": "Returns documents that contain terms matching a wildcard pattern.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.query_dsl.WildcardQuery"
},
"minProperties": 1,
"maxProperties": 1
},
"wrapper": {
"description": "A query that accepts any other query as base64 encoded string.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.WrapperQuery"
}
]
},
"type": {
"deprecated": true,
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.TypeQuery"
}
]
}
},
"minProperties": 1,
"maxProperties": 1,
"$defs": {
"_global.search._types.BoundaryScanner": {
"type": "string",
"enum": [
"chars",
"sentence",
"word"
]
},
"_global.search._types.FieldCollapse": {
"type": "object",
"properties": {
"field": {
"description": "The field to collapse the result set on",
"allOf": [
{
"$ref": "#/$defs/_types.Field"
}
]
},
"inner_hits": {
"description": "The number of inner hits and their sort order",
"oneOf": [
{
"$ref": "#/$defs/_global.search._types.InnerHits"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/_global.search._types.InnerHits"
}
}
]
},
"max_concurrent_group_searches": {
"description": "The number of concurrent requests allowed to retrieve the inner_hits per group",
"type": "number"
},
"collapse": {
"allOf": [
{
"$ref": "#/$defs/_global.search._types.FieldCollapse"
}
]
}
},
"required": [
"field"
]
},
"_global.search._types.Highlight": {
"allOf": [
{
"$ref": "#/$defs/_global.search._types.HighlightBase"
},
{
"type": "object",
"properties": {
"encoder": {
"allOf": [
{
"$ref": "#/$defs/_global.search._types.HighlighterEncoder"
}
]
},
"fields": {
"oneOf": [
{
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_global.search._types.HighlightField"
},
"minProperties": 1,
"maxProperties": 1
},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_global.search._types.HighlightField"
},
"minProperties": 1,
"maxProperties": 1
}
}
]
}
},
"required": [
"fields"
]
}
]
},
"_global.search._types.HighlightBase": {
"type": "object",
"properties": {
"type": {
"description": "\n\nSupported values include:\n - `plain`: The `plain` highlighter uses the standard Lucene highlighter\n - `fvh`: The fvh highlighter uses the Lucene Fast Vector highlighter.\n - `unified`: The unified highlighter uses the Lucene Unified Highlighter.\n\n",
"allOf": [
{
"$ref": "#/$defs/_global.search._types.HighlighterType"
}
]
},
"boundary_chars": {
"description": "A string that contains each boundary character.",
"default": ".,!? \\t\\n",
"type": "string"
},
"boundary_max_scan": {
"description": "How far to scan for boundary characters.",
"default": 20.0,
"type": "number"
},
"boundary_scanner": {
"description": "Specifies how to break the highlighted fragments: chars, sentence, or word.\nOnly valid for the unified and fvh highlighters.\nDefaults to `sentence` for the `unified` highlighter. Defaults to `chars` for the `fvh` highlighter.\n\nSupported values include:\n - `chars`: Use the characters specified by `boundary_chars` as highlighting boundaries.\nThe `boundary_max_scan` setting controls how far to scan for boundary characters.\nOnly valid for the `fvh` highlighter.\n - `sentence`: Break highlighted fragments at the next sentence boundary, as determined by Java’s `BreakIterator`.\nYou can specify the locale to use with `boundary_scanner_locale`.\nWhen used with the `unified` highlighter, the `sentence` scanner splits sentences bigger than `fragment_size` at the first word boundary next to fragment_size.\nYou can set `fragment_size` to `0` to never split any sentence.\n - `word`: Break highlighted fragments at the next word boundary, as determined by Java’s `BreakIterator`.\nYou can specify the locale to use with `boundary_scanner_locale`.\n\n",
"allOf": [
{
"$ref": "#/$defs/_global.search._types.BoundaryScanner"
}
]
},
"boundary_scanner_locale": {
"description": "Controls which locale is used to search for sentence and word boundaries.\nThis parameter takes a form of a language tag, for example: `\"en-US\"`, `\"fr-FR\"`, `\"ja-JP\"`.",
"default": "Locale.ROOT",
"type": "string"
},
"force_source": {
"deprecated": true,
"type": "boolean"
},
"fragmenter": {
"description": "Specifies how text should be broken up in highlight snippets: `simple` or `span`.\nOnly valid for the `plain` highlighter.",
"default": "span",
"allOf": [
{
"$ref": "#/$defs/_global.search._types.HighlighterFragmenter"
}
]
},
"fragment_size": {
"description": "The size of the highlighted fragment in characters.",
"default": 100.0,
"type": "number"
},
"highlight_filter": {
"type": "boolean"
},
"highlight_query": {
"description": "Highlight matches for a query other than the search query.\nThis is especially useful if you use a rescore query because those are not taken into account by highlighting by default.",
"allOf": [
{
"$ref": "#/$defs/_types.query_dsl.QueryContainer"
}
]
},
"max_fragment_length": {
"type": "number"
},
"max_analyzed_offset": {
"description": "If set to a non-negative value, highlighting stops at this defined maximum limit.\nThe rest of the text is not processed, thus not highlighted and no error is returned\nThe `max_analyzed_offset` query setting does not override the `index.highlight.max_analyzed_offset` setting, which prevails when it’s set to lower value than the query setting.",
"type": "number"
},
"no_match_size": {
"description": "The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.",
"default": 0.0,
"type": "number"
},
"number_of_fragments": {
"description": "The maximum number of fragments to return.\nIf the number of fragments is set to `0`, no fragments are returned.\nInstead, the entire field contents are highlighted and returned.\nThis can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required.\nIf `number_of_fragments` is `0`, `fragment_size` is ignored.",
"default": 5.0,
"type": "number"
},
"options": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"order": {
"description": "Sorts highlighted fragments by score when set to `score`.\nBy default, fragments will be output in the order they appear in the field (order: `none`).\nSetting this option to `score` will output the most relevant fragments first.\nEach highlighter applies its own logic to compute relevancy scores.",
"default": "none",
"allOf": [
{
"$ref": "#/$defs/_global.search._types.HighlighterOrder"
}
]
},
"phrase_limit": {
"description": "Controls the number of matching phrases in a document that are considered.\nPrevents the `fvh` highlighter from analyzing too many phrases and consuming too much memory.\nWhen using `matched_fields`, `phrase_limit` phrases per matched field are considered. Raising the limit increases query time and consumes more memory.\nOnly supported by the `fvh` highlighter.",
"default": 256.0,
"type": "number"
},
"post_tags": {
"description": "Use in conjunction with `pre_tags` to define the HTML tags to use for the highlighted text.\nBy default, highlighted text is wrapped in `<em>` and `</em>` tags.",
"type": "array",
"items": {
"type": "string"
}
},
"pre_tags": {
"description": "Use in conjunction with `post_tags` to define the HTML tags to use for the highlighted text.\nBy default, highlighted text is wrapped in `<em>` and `</em>` tags.",
"type": "array",
"items": {
"type": "string"
}
},
"require_field_match": {
"description": "By default, only fields that contains a query match are highlighted.\nSet to `false` to highlight all fields.",
"default": true,
"type": "boolean"
},
"tags_schema": {
"description": "Set to `styled` to use the built-in tag schema.",
"allOf": [
{
"$ref": "#/$defs/_global.search._types.HighlighterTagsSchema"
}
]
}
}
},
"_global.search._types.HighlightField": {
"allOf": [
{
"$ref": "#/$defs/_global.search._types.HighlightBase"
},
{
"type": "object",
"properties": {
"fragment_offset": {
"type": "number"
},
"matched_fields": {
"allOf": [
{
"$ref": "#/$defs/_types.Fields"
}
]
}
}
}
]
},
"_global.search._types.HighlighterEncoder": {
"type": "string",
"enum": [
"default",
"html"
]
},
"_global.search._types.HighlighterFragmenter": {
"type": "string",
"enum": [
"simple",
"span"
]
},
"_global.search._types.HighlighterOrder": {
"type": "string",
"enum": [
"score"
]
},
"_global.search._types.HighlighterTagsSchema": {
"type": "string",
"enum": [
"styled"
]
},
"_global.search._types.HighlighterType": {
"anyOf": [
{
"type": "string",
"enum": [
"plain",
"fvh",
"unified"
]
},
{
"type": "string"
}
]
},
"_global.search._types.InnerHits": {
"type": "object",
"properties": {
"name": {
"description": "The name for the particular inner hit definition in the response.\nUseful when a search request contains multiple inner hits.",
"allOf": [
{
"$ref": "#/$defs/_types.Name"
}
]
},
"size": {
"description": "The maximum number of hits to return per `inner_hits`.",
"default": 3.0,
"type": "number"
},
"from": {
"description": "Inner hit starting document offset.",
"default": 0.0,
"type": "number"
},
"collapse": {
"allOf": [
{
"$ref": "#/$defs/_global.search._types.FieldCollapse"
}
]
},
"docvalue_fields": {
"type": "array",
"items": {
"$ref": "#/$defs/_types.query_dsl.FieldAndFormat"
}
},
"explain": {
"type": "boolean"
},
"highlight": {
"allOf": [
{
"$ref": "#/$defs/_global.search._types.Highlight"
}
]
},
"ignore_unmapped": {
"type": "boolean"
},
"script_fields": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/_types.ScriptField"
}
},
"seq_no_primary_term": {
"type": "boolean"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/_types.Field"
}
},
"sort": {
"description": "How the inner hits should be sorted per `inner_hits`.\nBy default, inner hits are sorted by score.",
"allOf": [
{
"$ref": "#/$defs/_types.Sort"
}
]
},
"_source": {
"allOf": [
{
"$ref": "#/$defs/_global.search._types.SourceConfig"
}
]
},
"stored_fields": {
"allOf": [
{
"$ref": "#/$defs/_types.Fields"
}
]
},
"track_scores": {
"default": false,
"type": "boolean"
},
"version": {
"type": "boolean"
}
}
},
"_global.search._types.LearningToRank": {
"type": "object",
"properties": {
"model_id": {
"description": "The unique identifier of the trained model uploaded to Elasticsearch",
"type": "string"
},
"params": {
"description": "Named parameters to be passed to the query templates used for feature",
"type": "object",
"additionalProperties": {
"type": "object"
}
}
},
"required": [
"model_id"
]
},
"_global.search._types.PointInTimeReference": {
"type": "object",
"properties": {
"id": {
"allOf": [
{
"$ref": "#/$defs/_types.Id"
}
]
},
"keep_alive": {
"allOf": [
{
"$ref": "#/$defs/_types.Duration"
}
]
}
},
"required": [
"id"
]
},
"_global.search._types.Rescore": {
"allOf": [
{
"type": "object",
"properties": {
"window_size": {
"type": "number"
}
}
},
{
"type": "object",
"properties": {
"query": {
"allOf": [
{
"$ref": "#/$defs/_global.search._types.RescoreQuery"
}
]
},
"learning_to_rank": {
"allOf": [
{
"$ref": "#/$defs/_global.search._types.LearningToRank"
}
]
},
"script": {
"allOf": [
{
"$ref": "#/$defs/_global.search._types.ScriptRescore"
}
]
}
},
"minProperties": 1,
"maxProperties": 1
}
]
},
"_global
# --- truncated at 32 KB (408 KB total) ---
# Full source: https://artifacts.apis.io/elastic/json-schema/elastic-types-query-dsl-query-container-schema.json
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/json-schemas/elastic-types-query-dsl-query-container"
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.