From 8e5bcad8caf69efd93f3b7cfee477f07a88f601b Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Thu, 27 Mar 2025 16:14:23 +0100 Subject: [PATCH 1/2] search body refactor + object script --- output/openapi/elasticsearch-openapi.json | 636 ++- .../elasticsearch-serverless-openapi.json | 835 +-- output/schema/schema-serverless.json | 1807 +++--- output/schema/schema.json | 4870 +++++++++-------- output/schema/validation-errors.json | 12 +- output/typescript/types.ts | 79 +- specification/_global/msearch/types.ts | 166 +- specification/_global/search/SearchRequest.ts | 12 +- .../search/_types/SearchRequestBody.ts | 238 + specification/_types/Scripting.ts | 20 +- 10 files changed, 4538 insertions(+), 4137 deletions(-) create mode 100644 specification/_global/search/_types/SearchRequestBody.ts diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 4fc448ff3e..a5d1963735 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -73689,7 +73689,7 @@ "$ref": "#/components/schemas/_global.msearch:MultisearchHeader" }, { - "$ref": "#/components/schemas/_global.msearch:MultisearchBody" + "$ref": "#/components/schemas/_global.search._types:SearchRequestBody" } ] }, @@ -73731,13 +73731,11 @@ } } }, - "_global.msearch:MultisearchBody": { + "_global.search._types:SearchRequestBody": { "type": "object", "properties": { "aggregations": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html" - }, + "description": "Defines the aggregations that are run as part of the search request.", "type": "object", "additionalProperties": { "$ref": "#/components/schemas/_types.aggregations:AggregationContainer" @@ -73746,11 +73744,8 @@ "collapse": { "$ref": "#/components/schemas/_global.search._types:FieldCollapse" }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, "explain": { - "description": "If true, returns detailed information about score computation as part of a hit.", + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", "type": "boolean" }, "ext": { @@ -73760,18 +73755,46 @@ "type": "object" } }, - "stored_fields": { - "$ref": "#/components/schemas/_types:Fields" + "from": { + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "type": "number" + }, + "highlight": { + "$ref": "#/components/schemas/_global.search._types:Highlight" + }, + "track_total_hits": { + "$ref": "#/components/schemas/_global.search._types:TrackHits" + }, + "indices_boost": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html#relevance-scores" + }, + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + } }, "docvalue_fields": { - "description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#docvalue-fields" + }, + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", "type": "array", "items": { "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" } }, "knn": { - "description": "Defines the approximate kNN search to run.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#approximate-knn" + }, + "description": "The approximate kNN search to run.", "oneOf": [ { "$ref": "#/components/schemas/_types:KnnSearch" @@ -73784,36 +73807,25 @@ } ] }, - "from": { - "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", - "type": "number" - }, - "highlight": { - "$ref": "#/components/schemas/_global.search._types:Highlight" - }, - "indices_boost": { - "description": "Boosts the _score of documents from specified indices.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "minProperties": 1, - "maxProperties": 1 - } + "rank": { + "$ref": "#/components/schemas/_types:RankContainer" }, "min_score": { - "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in the search results.", + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in the search results.", "type": "number" }, "post_filter": { "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" }, "profile": { + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", "type": "boolean" }, + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, "rescore": { + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", "oneOf": [ { "$ref": "#/components/schemas/_global.search._types:Rescore" @@ -73826,6 +73838,9 @@ } ] }, + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + }, "script_fields": { "description": "Retrieve a script evaluation (based on different fields) for each hit.", "type": "object", @@ -73837,9 +73852,12 @@ "$ref": "#/components/schemas/_types:SortResults" }, "size": { - "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", "type": "number" }, + "slice": { + "$ref": "#/components/schemas/_types:SlicedScroll" + }, "sort": { "$ref": "#/components/schemas/_types:Sort" }, @@ -73847,53 +73865,303 @@ "$ref": "#/components/schemas/_global.search._types:SourceConfig" }, "fields": { - "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", "type": "array", "items": { "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" } }, + "suggest": { + "$ref": "#/components/schemas/_global.search._types:Suggester" + }, "terminate_after": { - "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", "type": "number" }, - "stats": { - "description": "Stats groups to associate with the search. Each group maintains a statistics\naggregation for its associated searches. You can retrieve these stats using\nthe indices stats API.", - "type": "array", - "items": { - "type": "string" - } - }, "timeout": { - "description": "Specifies the period of time to wait for a response from each shard. If no response\nis received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", "type": "string" }, "track_scores": { - "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", "type": "boolean" }, - "track_total_hits": { - "$ref": "#/components/schemas/_global.search._types:TrackHits" - }, "version": { - "description": "If true, returns document version as part of a hit.", + "description": "If `true`, the request returns the document version as part of a hit.", "type": "boolean" }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping:RuntimeFields" - }, "seq_no_primary_term": { - "description": "If true, returns sequence number and primary term of the last modification\nof each hit. See Optimistic concurrency control.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html" + }, + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", "type": "boolean" }, + "stored_fields": { + "$ref": "#/components/schemas/_types:Fields" + }, "pit": { "$ref": "#/components/schemas/_global.search._types:PointInTimeReference" }, - "suggest": { - "$ref": "#/components/schemas/_global.search._types:Suggester" + "runtime_mappings": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFields" + }, + "stats": { + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "type": "array", + "items": { + "type": "string" + } } } }, + "_types:RankContainer": { + "type": "object", + "properties": { + "rrf": { + "$ref": "#/components/schemas/_types:RrfRank" + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types:RrfRank": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RankBase" + }, + { + "type": "object", + "properties": { + "rank_constant": { + "description": "How much influence documents in individual result sets per query have over the final ranked result set", + "type": "number" + }, + "rank_window_size": { + "description": "Size of the individual result sets per query", + "type": "number" + } + } + } + ] + }, + "_types:RankBase": { + "type": "object" + }, + "_types:RetrieverContainer": { + "type": "object", + "properties": { + "standard": { + "$ref": "#/components/schemas/_types:StandardRetriever" + }, + "knn": { + "$ref": "#/components/schemas/_types:KnnRetriever" + }, + "rrf": { + "$ref": "#/components/schemas/_types:RRFRetriever" + }, + "text_similarity_reranker": { + "$ref": "#/components/schemas/_types:TextSimilarityReranker" + }, + "rule": { + "$ref": "#/components/schemas/_types:RuleRetriever" + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types:StandardRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "search_after": { + "$ref": "#/components/schemas/_types:SortResults" + }, + "terminate_after": { + "description": "Maximum number of documents to collect for each shard.", + "type": "number" + }, + "sort": { + "$ref": "#/components/schemas/_types:Sort" + }, + "collapse": { + "$ref": "#/components/schemas/_global.search._types:FieldCollapse" + } + } + } + ] + }, + "_types:RetrieverBase": { + "type": "object", + "properties": { + "filter": { + "description": "Query to filter the documents that can match.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + } + } + ] + }, + "min_score": { + "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", + "type": "number" + } + } + }, + "_types:KnnRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The name of the vector field to search against.", + "type": "string" + }, + "query_vector": { + "$ref": "#/components/schemas/_types:QueryVector" + }, + "query_vector_builder": { + "$ref": "#/components/schemas/_types:QueryVectorBuilder" + }, + "k": { + "description": "Number of nearest neighbors to return as top hits.", + "type": "number" + }, + "num_candidates": { + "description": "Number of nearest neighbor candidates to consider per shard.", + "type": "number" + }, + "similarity": { + "description": "The minimum similarity required for a document to be considered a match.", + "type": "number" + }, + "rescore_vector": { + "$ref": "#/components/schemas/_types:RescoreVector" + } + }, + "required": [ + "field", + "k", + "num_candidates" + ] + } + ] + }, + "_types:RRFRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "retrievers": { + "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + } + }, + "rank_constant": { + "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", + "type": "number" + }, + "rank_window_size": { + "description": "This value determines the size of the individual result sets per query.", + "type": "number" + } + }, + "required": [ + "retrievers" + ] + } + ] + }, + "_types:TextSimilarityReranker": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + }, + "rank_window_size": { + "description": "This value determines how many documents we will consider from the nested retriever.", + "type": "number" + }, + "inference_id": { + "description": "Unique identifier of the inference endpoint created using the inference API.", + "type": "string" + }, + "inference_text": { + "description": "The text snippet used as the basis for similarity comparison", + "type": "string" + }, + "field": { + "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", + "type": "string" + } + }, + "required": [ + "retriever" + ] + } + ] + }, + "_types:RuleRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "ruleset_ids": { + "description": "The ruleset IDs containing the rules this retriever is evaluating against.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:Id" + } + }, + "match_criteria": { + "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", + "type": "object" + }, + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + }, + "rank_window_size": { + "description": "This value determines the size of the individual result set.", + "type": "number" + } + }, + "required": [ + "ruleset_ids", + "match_criteria", + "retriever" + ] + } + ] + }, "_global.msearch:ResponseItem": { "oneOf": [ { @@ -74065,8 +74333,7 @@ } }, "source": { - "description": "The script source.\nFor search templates, an object containing the search template.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } }, "required": [ @@ -74074,6 +74341,16 @@ "source" ] }, + "_types:ScriptSource": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_global.search._types:SearchRequestBody" + } + ] + }, "_global.get_script_context:Context": { "type": "object", "properties": { @@ -91418,253 +91695,6 @@ "index" ] }, - "_types:RankContainer": { - "type": "object", - "properties": { - "rrf": { - "$ref": "#/components/schemas/_types:RrfRank" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types:RrfRank": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RankBase" - }, - { - "type": "object", - "properties": { - "rank_constant": { - "description": "How much influence documents in individual result sets per query have over the final ranked result set", - "type": "number" - }, - "rank_window_size": { - "description": "Size of the individual result sets per query", - "type": "number" - } - } - } - ] - }, - "_types:RankBase": { - "type": "object" - }, - "_types:RetrieverContainer": { - "type": "object", - "properties": { - "standard": { - "$ref": "#/components/schemas/_types:StandardRetriever" - }, - "knn": { - "$ref": "#/components/schemas/_types:KnnRetriever" - }, - "rrf": { - "$ref": "#/components/schemas/_types:RRFRetriever" - }, - "text_similarity_reranker": { - "$ref": "#/components/schemas/_types:TextSimilarityReranker" - }, - "rule": { - "$ref": "#/components/schemas/_types:RuleRetriever" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types:StandardRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "search_after": { - "$ref": "#/components/schemas/_types:SortResults" - }, - "terminate_after": { - "description": "Maximum number of documents to collect for each shard.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types:Sort" - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types:FieldCollapse" - } - } - } - ] - }, - "_types:RetrieverBase": { - "type": "object", - "properties": { - "filter": { - "description": "Query to filter the documents that can match.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - } - } - ] - }, - "min_score": { - "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", - "type": "number" - } - } - }, - "_types:KnnRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "field": { - "description": "The name of the vector field to search against.", - "type": "string" - }, - "query_vector": { - "$ref": "#/components/schemas/_types:QueryVector" - }, - "query_vector_builder": { - "$ref": "#/components/schemas/_types:QueryVectorBuilder" - }, - "k": { - "description": "Number of nearest neighbors to return as top hits.", - "type": "number" - }, - "num_candidates": { - "description": "Number of nearest neighbor candidates to consider per shard.", - "type": "number" - }, - "similarity": { - "description": "The minimum similarity required for a document to be considered a match.", - "type": "number" - }, - "rescore_vector": { - "$ref": "#/components/schemas/_types:RescoreVector" - } - }, - "required": [ - "field", - "k", - "num_candidates" - ] - } - ] - }, - "_types:RRFRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "retrievers": { - "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - } - }, - "rank_constant": { - "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", - "type": "number" - }, - "rank_window_size": { - "description": "This value determines the size of the individual result sets per query.", - "type": "number" - } - }, - "required": [ - "retrievers" - ] - } - ] - }, - "_types:TextSimilarityReranker": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "retriever": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - }, - "rank_window_size": { - "description": "This value determines how many documents we will consider from the nested retriever.", - "type": "number" - }, - "inference_id": { - "description": "Unique identifier of the inference endpoint created using the inference API.", - "type": "string" - }, - "inference_text": { - "description": "The text snippet used as the basis for similarity comparison", - "type": "string" - }, - "field": { - "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", - "type": "string" - } - }, - "required": [ - "retriever" - ] - } - ] - }, - "_types:RuleRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "ruleset_ids": { - "description": "The ruleset IDs containing the rules this retriever is evaluating against.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:Id" - } - }, - "match_criteria": { - "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", - "type": "object" - }, - "retriever": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - }, - "rank_window_size": { - "description": "This value determines the size of the individual result set.", - "type": "number" - } - }, - "required": [ - "ruleset_ids", - "match_criteria", - "retriever" - ] - } - ] - }, "search_application._types:SearchApplication": { "allOf": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 61a0b6bbfa..d152549faf 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -48090,13 +48090,417 @@ } }, "source": { - "description": "The script source.\nFor search templates, an object containing the search template.", + "$ref": "#/components/schemas/_types:ScriptSource" + } + }, + "required": [ + "lang", + "source" + ] + }, + "_types:ScriptSource": { + "oneOf": [ + { "type": "string" + }, + { + "$ref": "#/components/schemas/_global.search._types:SearchRequestBody" + } + ] + }, + "_global.search._types:SearchRequestBody": { + "type": "object", + "properties": { + "aggregations": { + "description": "Defines the aggregations that are run as part of the search request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations:AggregationContainer" + } + }, + "collapse": { + "$ref": "#/components/schemas/_global.search._types:FieldCollapse" + }, + "explain": { + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "type": "number" + }, + "highlight": { + "$ref": "#/components/schemas/_global.search._types:Highlight" + }, + "track_total_hits": { + "$ref": "#/components/schemas/_global.search._types:TrackHits" + }, + "indices_boost": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html#relevance-scores" + }, + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + }, + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#docvalue-fields" + }, + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" + } + }, + "knn": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#approximate-knn" + }, + "description": "The approximate kNN search to run.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types:KnnSearch" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:KnnSearch" + } + } + ] + }, + "min_score": { + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in the search results.", + "type": "number" + }, + "post_filter": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "profile": { + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "type": "boolean" + }, + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "rescore": { + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types:Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types:Rescore" + } + } + ] + }, + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + }, + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types:ScriptField" + } + }, + "search_after": { + "$ref": "#/components/schemas/_types:SortResults" + }, + "size": { + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "type": "number" + }, + "slice": { + "$ref": "#/components/schemas/_types:SlicedScroll" + }, + "sort": { + "$ref": "#/components/schemas/_types:Sort" + }, + "_source": { + "$ref": "#/components/schemas/_global.search._types:SourceConfig" + }, + "fields": { + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" + } + }, + "suggest": { + "$ref": "#/components/schemas/_global.search._types:Suggester" + }, + "terminate_after": { + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "type": "number" + }, + "timeout": { + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "type": "boolean" + }, + "version": { + "description": "If `true`, the request returns the document version as part of a hit.", + "type": "boolean" + }, + "seq_no_primary_term": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html" + }, + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", + "type": "boolean" + }, + "stored_fields": { + "$ref": "#/components/schemas/_types:Fields" + }, + "pit": { + "$ref": "#/components/schemas/_global.search._types:PointInTimeReference" + }, + "runtime_mappings": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFields" + }, + "stats": { + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "_types:RetrieverContainer": { + "type": "object", + "properties": { + "standard": { + "$ref": "#/components/schemas/_types:StandardRetriever" + }, + "knn": { + "$ref": "#/components/schemas/_types:KnnRetriever" + }, + "rrf": { + "$ref": "#/components/schemas/_types:RRFRetriever" + }, + "text_similarity_reranker": { + "$ref": "#/components/schemas/_types:TextSimilarityReranker" + }, + "rule": { + "$ref": "#/components/schemas/_types:RuleRetriever" + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types:StandardRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "search_after": { + "$ref": "#/components/schemas/_types:SortResults" + }, + "terminate_after": { + "description": "Maximum number of documents to collect for each shard.", + "type": "number" + }, + "sort": { + "$ref": "#/components/schemas/_types:Sort" + }, + "collapse": { + "$ref": "#/components/schemas/_global.search._types:FieldCollapse" + } + } + } + ] + }, + "_types:RetrieverBase": { + "type": "object", + "properties": { + "filter": { + "description": "Query to filter the documents that can match.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + } + } + ] + }, + "min_score": { + "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", + "type": "number" + } + } + }, + "_types:KnnRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The name of the vector field to search against.", + "type": "string" + }, + "query_vector": { + "$ref": "#/components/schemas/_types:QueryVector" + }, + "query_vector_builder": { + "$ref": "#/components/schemas/_types:QueryVectorBuilder" + }, + "k": { + "description": "Number of nearest neighbors to return as top hits.", + "type": "number" + }, + "num_candidates": { + "description": "Number of nearest neighbor candidates to consider per shard.", + "type": "number" + }, + "similarity": { + "description": "The minimum similarity required for a document to be considered a match.", + "type": "number" + }, + "rescore_vector": { + "$ref": "#/components/schemas/_types:RescoreVector" + } + }, + "required": [ + "field", + "k", + "num_candidates" + ] + } + ] + }, + "_types:RRFRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "retrievers": { + "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + } + }, + "rank_constant": { + "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", + "type": "number" + }, + "rank_window_size": { + "description": "This value determines the size of the individual result sets per query.", + "type": "number" + } + }, + "required": [ + "retrievers" + ] + } + ] + }, + "_types:TextSimilarityReranker": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + }, + "rank_window_size": { + "description": "This value determines how many documents we will consider from the nested retriever.", + "type": "number" + }, + "inference_id": { + "description": "Unique identifier of the inference endpoint created using the inference API.", + "type": "string" + }, + "inference_text": { + "description": "The text snippet used as the basis for similarity comparison", + "type": "string" + }, + "field": { + "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", + "type": "string" + } + }, + "required": [ + "retriever" + ] + } + ] + }, + "_types:RuleRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "ruleset_ids": { + "description": "The ruleset IDs containing the rules this retriever is evaluating against.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:Id" + } + }, + "match_criteria": { + "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", + "type": "object" + }, + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + }, + "rank_window_size": { + "description": "This value determines the size of the individual result set.", + "type": "number" + } + }, + "required": [ + "ruleset_ids", + "match_criteria", + "retriever" + ] } - }, - "required": [ - "lang", - "source" ] }, "graph._types:Hop": { @@ -57351,208 +57755,45 @@ "$ref": "#/components/schemas/_global.msearch:MultisearchHeader" }, { - "$ref": "#/components/schemas/_global.msearch:MultisearchBody" + "$ref": "#/components/schemas/_global.search._types:SearchRequestBody" } ] }, "_global.msearch:MultisearchHeader": { "type": "object", - "properties": { - "allow_no_indices": { - "type": "boolean" - }, - "expand_wildcards": { - "$ref": "#/components/schemas/_types:ExpandWildcards" - }, - "ignore_unavailable": { - "type": "boolean" - }, - "index": { - "$ref": "#/components/schemas/_types:Indices" - }, - "preference": { - "type": "string" - }, - "request_cache": { - "type": "boolean" - }, - "routing": { - "$ref": "#/components/schemas/_types:Routing" - }, - "search_type": { - "$ref": "#/components/schemas/_types:SearchType" - }, - "ccs_minimize_roundtrips": { - "type": "boolean" - }, - "allow_partial_search_results": { - "type": "boolean" - }, - "ignore_throttled": { - "type": "boolean" - } - } - }, - "_global.msearch:MultisearchBody": { - "type": "object", - "properties": { - "aggregations": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html" - }, - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations:AggregationContainer" - } - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types:FieldCollapse" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "explain": { - "description": "If true, returns detailed information about score computation as part of a hit.", - "type": "boolean" - }, - "ext": { - "description": "Configuration of search extensions defined by Elasticsearch plugins.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "stored_fields": { - "$ref": "#/components/schemas/_types:Fields" - }, - "docvalue_fields": { - "description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" - } - }, - "knn": { - "description": "Defines the approximate kNN search to run.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types:KnnSearch" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:KnnSearch" - } - } - ] - }, - "from": { - "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", - "type": "number" - }, - "highlight": { - "$ref": "#/components/schemas/_global.search._types:Highlight" - }, - "indices_boost": { - "description": "Boosts the _score of documents from specified indices.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "min_score": { - "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in the search results.", - "type": "number" - }, - "post_filter": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "profile": { - "type": "boolean" - }, - "rescore": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types:Rescore" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types:Rescore" - } - } - ] - }, - "script_fields": { - "description": "Retrieve a script evaluation (based on different fields) for each hit.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types:ScriptField" - } - }, - "search_after": { - "$ref": "#/components/schemas/_types:SortResults" - }, - "size": { - "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types:Sort" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types:SourceConfig" - }, - "fields": { - "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" - } + "properties": { + "allow_no_indices": { + "type": "boolean" }, - "terminate_after": { - "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", - "type": "number" + "expand_wildcards": { + "$ref": "#/components/schemas/_types:ExpandWildcards" }, - "stats": { - "description": "Stats groups to associate with the search. Each group maintains a statistics\naggregation for its associated searches. You can retrieve these stats using\nthe indices stats API.", - "type": "array", - "items": { - "type": "string" - } + "ignore_unavailable": { + "type": "boolean" }, - "timeout": { - "description": "Specifies the period of time to wait for a response from each shard. If no response\nis received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "index": { + "$ref": "#/components/schemas/_types:Indices" + }, + "preference": { "type": "string" }, - "track_scores": { - "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", + "request_cache": { "type": "boolean" }, - "track_total_hits": { - "$ref": "#/components/schemas/_global.search._types:TrackHits" - }, - "version": { - "description": "If true, returns document version as part of a hit.", - "type": "boolean" + "routing": { + "$ref": "#/components/schemas/_types:Routing" }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping:RuntimeFields" + "search_type": { + "$ref": "#/components/schemas/_types:SearchType" }, - "seq_no_primary_term": { - "description": "If true, returns sequence number and primary term of the last modification\nof each hit. See Optimistic concurrency control.", + "ccs_minimize_roundtrips": { "type": "boolean" }, - "pit": { - "$ref": "#/components/schemas/_global.search._types:PointInTimeReference" + "allow_partial_search_results": { + "type": "boolean" }, - "suggest": { - "$ref": "#/components/schemas/_global.search._types:Suggester" + "ignore_throttled": { + "type": "boolean" } } }, @@ -58491,220 +58732,6 @@ "index" ] }, - "_types:RetrieverContainer": { - "type": "object", - "properties": { - "standard": { - "$ref": "#/components/schemas/_types:StandardRetriever" - }, - "knn": { - "$ref": "#/components/schemas/_types:KnnRetriever" - }, - "rrf": { - "$ref": "#/components/schemas/_types:RRFRetriever" - }, - "text_similarity_reranker": { - "$ref": "#/components/schemas/_types:TextSimilarityReranker" - }, - "rule": { - "$ref": "#/components/schemas/_types:RuleRetriever" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types:StandardRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "search_after": { - "$ref": "#/components/schemas/_types:SortResults" - }, - "terminate_after": { - "description": "Maximum number of documents to collect for each shard.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types:Sort" - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types:FieldCollapse" - } - } - } - ] - }, - "_types:RetrieverBase": { - "type": "object", - "properties": { - "filter": { - "description": "Query to filter the documents that can match.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - } - } - ] - }, - "min_score": { - "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", - "type": "number" - } - } - }, - "_types:KnnRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "field": { - "description": "The name of the vector field to search against.", - "type": "string" - }, - "query_vector": { - "$ref": "#/components/schemas/_types:QueryVector" - }, - "query_vector_builder": { - "$ref": "#/components/schemas/_types:QueryVectorBuilder" - }, - "k": { - "description": "Number of nearest neighbors to return as top hits.", - "type": "number" - }, - "num_candidates": { - "description": "Number of nearest neighbor candidates to consider per shard.", - "type": "number" - }, - "similarity": { - "description": "The minimum similarity required for a document to be considered a match.", - "type": "number" - }, - "rescore_vector": { - "$ref": "#/components/schemas/_types:RescoreVector" - } - }, - "required": [ - "field", - "k", - "num_candidates" - ] - } - ] - }, - "_types:RRFRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "retrievers": { - "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - } - }, - "rank_constant": { - "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", - "type": "number" - }, - "rank_window_size": { - "description": "This value determines the size of the individual result sets per query.", - "type": "number" - } - }, - "required": [ - "retrievers" - ] - } - ] - }, - "_types:TextSimilarityReranker": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "retriever": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - }, - "rank_window_size": { - "description": "This value determines how many documents we will consider from the nested retriever.", - "type": "number" - }, - "inference_id": { - "description": "Unique identifier of the inference endpoint created using the inference API.", - "type": "string" - }, - "inference_text": { - "description": "The text snippet used as the basis for similarity comparison", - "type": "string" - }, - "field": { - "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", - "type": "string" - } - }, - "required": [ - "retriever" - ] - } - ] - }, - "_types:RuleRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "ruleset_ids": { - "description": "The ruleset IDs containing the rules this retriever is evaluating against.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:Id" - } - }, - "match_criteria": { - "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", - "type": "object" - }, - "retriever": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - }, - "rank_window_size": { - "description": "This value determines the size of the individual result set.", - "type": "number" - } - }, - "required": [ - "ruleset_ids", - "match_criteria", - "retriever" - ] - } - ] - }, "search_application._types:SearchApplication": { "allOf": [ { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 412c2c100d..07facc20ba 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -52393,7 +52393,7 @@ "name": "RequestItem", "namespace": "_global.msearch" }, - "specLocation": "_global/msearch/types.ts#L47-L50", + "specLocation": "_global/msearch/types.ts#L26-L29", "type": { "items": [ { @@ -52406,8 +52406,8 @@ { "kind": "instance_of", "type": { - "name": "MultisearchBody", - "namespace": "_global.msearch" + "name": "SearchRequestBody", + "namespace": "_global.search._types" } } ], @@ -52544,7 +52544,7 @@ } } ], - "specLocation": "_global/msearch/types.ts#L52-L67" + "specLocation": "_global/msearch/types.ts#L31-L46" }, { "kind": "type_alias", @@ -52672,16 +52672,15 @@ { "kind": "interface", "name": { - "name": "MultisearchBody", - "namespace": "_global.msearch" + "name": "SearchRequestBody", + "namespace": "_global.search._types" }, "properties": [ { "aliases": [ "aggs" ], - "extDocId": "search-aggregations", - "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html", + "description": "Defines the aggregations that are run as part of the search request.", "name": "aggregations", "required": false, "type": { @@ -52704,6 +52703,7 @@ } }, { + "description": "Collapses search results the values of the specified field.", "name": "collapse", "required": false, "type": { @@ -52715,19 +52715,7 @@ } }, { - "description": "Defines the search definition using the Query DSL.", - "name": "query", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" - } - } - }, - { - "description": "If true, returns detailed information about score computation as part of a hit.", + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", "name": "explain", "required": false, "serverDefault": false, @@ -52759,19 +52747,75 @@ } }, { - "description": "List of stored fields to return as part of a hit. If no fields are specified,\nno stored fields are included in the response. If this field is specified, the _source\nparameter defaults to false. You can pass _source: true to return both source fields\nand stored fields in the search response.", - "name": "stored_fields", + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "name": "from", "required": false, + "serverDefault": 0, "type": { "kind": "instance_of", "type": { - "name": "Fields", + "name": "integer", "namespace": "_types" } } }, { - "description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.", + "description": "Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.", + "name": "highlight", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Highlight", + "namespace": "_global.search._types" + } + } + }, + { + "description": "Number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "name": "track_total_hits", + "required": false, + "serverDefault": "10000", + "type": { + "kind": "instance_of", + "type": { + "name": "TrackHits", + "namespace": "_global.search._types" + } + } + }, + { + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "extDocId": "relevance-scores", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html#relevance-scores", + "name": "indices_boost", + "required": false, + "type": { + "kind": "array_of", + "value": { + "key": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + "kind": "dictionary_of", + "singleKey": true, + "value": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + } + } + }, + { + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", + "extDocId": "docvalue-fields", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#docvalue-fields", "name": "docvalue_fields", "required": false, "type": { @@ -52792,7 +52836,9 @@ "since": "8.4.0" } }, - "description": "Defines the approximate kNN search to run.", + "description": "The approximate kNN search to run.", + "extDocId": "knn-approximate", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#approximate-knn", "name": "knn", "required": false, "type": { @@ -52819,69 +52865,47 @@ } }, { - "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", - "name": "from", + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in the search results.", + "name": "min_score", "required": false, - "serverDefault": 0, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "double", "namespace": "_types" } } }, { - "name": "highlight", + "description": "Use the `post_filter` parameter to filter search results.\nThe search hits are filtered after the aggregations are calculated.\nA post filter has no impact on the aggregation results.", + "name": "post_filter", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Highlight", - "namespace": "_global.search._types" - } - } - }, - { - "description": "Boosts the _score of documents from specified indices.", - "name": "indices_boost", - "required": false, - "type": { - "kind": "array_of", - "value": { - "key": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - }, - "kind": "dictionary_of", - "singleKey": true, - "value": { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - } + "name": "QueryContainer", + "namespace": "_types.query_dsl" } } }, { - "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in the search results.", - "name": "min_score", + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "name": "profile", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "double", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "name": "post_filter", + "description": "The search definition using the Query DSL.", + "extDocId": "query-dsl", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html", + "name": "query", "required": false, "type": { "kind": "instance_of", @@ -52892,17 +52916,7 @@ } }, { - "name": "profile", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", "name": "rescore", "required": false, "type": { @@ -52928,6 +52942,27 @@ "kind": "union_of" } }, + { + "availability": { + "serverless": { + "stability": "stable" + }, + "stack": { + "since": "8.14.0", + "stability": "stable" + } + }, + "description": "A retriever is a specification to describe top documents returned from a search.\nA retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.", + "name": "retriever", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "RetrieverContainer", + "namespace": "_types" + } + } + }, { "description": "Retrieve a script evaluation (based on different fields) for each hit.", "name": "script_fields", @@ -52952,6 +52987,7 @@ } }, { + "description": "Used to retrieve the next page of hits using a set of sort values from the previous page.", "name": "search_after", "required": false, "type": { @@ -52963,7 +52999,7 @@ } }, { - "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", "name": "size", "required": false, "serverDefault": 10, @@ -52976,8 +53012,21 @@ } }, { - "docId": "sort-search-results", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html", + "description": "Split a scrolled search into multiple slices that can be consumed independently.", + "name": "slice", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SlicedScroll", + "namespace": "_types" + } + } + }, + { + "description": "A comma-separated list of : pairs.", + "extDocId": "sort-search-results", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html", "name": "sort", "required": false, "type": { @@ -52989,7 +53038,9 @@ } }, { - "description": "Indicates which source fields are returned for matching documents. These\nfields are returned in the hits._source property of the search response.", + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nIf the `stored_fields` property is specified, the `_source` property defaults to `false`.\nOtherwise, it defaults to `true`.", + "extDocId": "source-filtering", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering", "name": "_source", "required": false, "type": { @@ -53001,7 +53052,7 @@ } }, { - "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", "name": "fields", "required": false, "type": { @@ -53016,35 +53067,32 @@ } }, { - "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", - "name": "terminate_after", + "description": "Defines a suggester that provides similar looking terms based on a provided text.", + "name": "suggest", "required": false, - "serverDefault": 0, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "Suggester", + "namespace": "_global.search._types" } } }, { - "description": "Stats groups to associate with the search. Each group maintains a statistics\naggregation for its associated searches. You can retrieve these stats using\nthe indices stats API.", - "name": "stats", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "name": "terminate_after", "required": false, + "serverDefault": 0, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" } } }, { - "description": "Specifies the period of time to wait for a response from each shard. If no response\nis received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", "name": "timeout", "required": false, "type": { @@ -53056,7 +53104,7 @@ } }, { - "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", "name": "track_scores", "required": false, "serverDefault": false, @@ -53069,22 +53117,24 @@ } }, { - "description": "Number of hits matching the query to count accurately. If true, the exact\nnumber of hits is returned at the cost of some performance. If false, the\nresponse does not include the total number of hits matching the query.\nDefaults to 10,000 hits.", - "name": "track_total_hits", + "description": "If `true`, the request returns the document version as part of a hit.", + "name": "version", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "TrackHits", - "namespace": "_global.search._types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "If true, returns document version as part of a hit.", - "name": "version", + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", + "extDocId": "optimistic-concurrency", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html", + "name": "seq_no_primary_term", "required": false, - "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -53094,54 +53144,62 @@ } }, { - "description": "Defines one or more runtime fields in the search request. These fields take\nprecedence over mapped fields with the same name.", - "name": "runtime_mappings", + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` property defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "extDocId": "stored-fields", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#stored-fields", + "name": "stored_fields", "required": false, "type": { "kind": "instance_of", "type": { - "name": "RuntimeFields", - "namespace": "_types.mapping" + "name": "Fields", + "namespace": "_types" } } }, { - "description": "If true, returns sequence number and primary term of the last modification\nof each hit. See Optimistic concurrency control.", - "name": "seq_no_primary_term", + "description": "Limit the search to a point in time (PIT).\nIf you provide a PIT, you cannot specify an `` in the request path.", + "name": "pit", "required": false, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "PointInTimeReference", + "namespace": "_global.search._types" } } }, { - "description": "Limits the search to a point in time (PIT). If you provide a PIT, you\ncannot specify an in the request path.", - "name": "pit", + "description": "One or more runtime fields in the search request.\nThese fields take precedence over mapped fields with the same name.", + "extDocId": "runtime-search-request", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime-search-request.html", + "name": "runtime_mappings", "required": false, "type": { "kind": "instance_of", "type": { - "name": "PointInTimeReference", - "namespace": "_global.search._types" + "name": "RuntimeFields", + "namespace": "_types.mapping" } } }, { - "name": "suggest", + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "name": "stats", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "Suggester", - "namespace": "_global.search._types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } } } ], - "specLocation": "_global/msearch/types.ts#L70-L204" + "specLocation": "_global/search/_types/SearchRequestBody.ts#L42-L238" }, { "kind": "interface", @@ -57224,7 +57282,7 @@ } ], "shortcutProperty": "source", - "specLocation": "_types/Scripting.ts#L75-L99" + "specLocation": "_types/Scripting.ts#L65-L89" }, { "isOpen": true, @@ -57251,7 +57309,7 @@ "name": "ScriptLanguage", "namespace": "_types" }, - "specLocation": "_types/Scripting.ts#L24-L45" + "specLocation": "_types/Scripting.ts#L25-L46" }, { "kind": "enum", @@ -59393,7 +59451,7 @@ } } ], - "specLocation": "_types/Scripting.ts#L101-L104" + "specLocation": "_types/Scripting.ts#L91-L94" }, { "kind": "type_alias", @@ -73221,6 +73279,38 @@ ], "specLocation": "_types/aggregations/bucket.ts#L1091-L1115" }, + { + "codegenNames": [ + "enabled", + "count" + ], + "description": "Number of hits matching the query to count accurately. If true, the exact\nnumber of hits is returned at the cost of some performance. If false, the\nresponse does not include the total number of hits matching the query.\nDefaults to 10,000 hits.", + "kind": "type_alias", + "name": { + "name": "TrackHits", + "namespace": "_global.search._types" + }, + "specLocation": "_global/search/_types/hits.ts#L143-L151", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + ], + "kind": "union_of" + } + }, { "kind": "interface", "name": { @@ -73377,6 +73467,80 @@ ], "specLocation": "_types/Knn.ts#L35-L62" }, + { + "kind": "interface", + "name": { + "name": "RankContainer", + "namespace": "_types" + }, + "properties": [ + { + "description": "The reciprocal rank fusion parameters", + "name": "rrf", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "RrfRank", + "namespace": "_types" + } + } + } + ], + "specLocation": "_types/Rank.ts#L22-L28", + "variants": { + "kind": "container" + } + }, + { + "inherits": { + "type": { + "name": "RankBase", + "namespace": "_types" + } + }, + "kind": "interface", + "name": { + "name": "RrfRank", + "namespace": "_types" + }, + "properties": [ + { + "description": "How much influence documents in individual result sets per query have over the final ranked result set", + "name": "rank_constant", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "description": "Size of the individual result sets per query", + "name": "rank_window_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + ], + "specLocation": "_types/Rank.ts#L32-L37" + }, + { + "kind": "interface", + "name": { + "name": "RankBase", + "namespace": "_types" + }, + "properties": [], + "specLocation": "_types/Rank.ts#L30-L30" + }, { "kind": "interface", "name": { @@ -73559,304 +73723,542 @@ "specLocation": "_global/search/_types/rescoring.ts#L88-L97" }, { - "kind": "type_alias", + "kind": "interface", "name": { - "name": "SortResults", + "name": "RetrieverContainer", "namespace": "_types" }, - "specLocation": "_types/sort.ts#L106-L106", - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", + "properties": [ + { + "description": "A retriever that replaces the functionality of a traditional query.", + "name": "standard", + "required": false, "type": { - "name": "FieldValue", - "namespace": "_types" + "kind": "instance_of", + "type": { + "name": "StandardRetriever", + "namespace": "_types" + } + } + }, + { + "description": "A retriever that replaces the functionality of a knn search.", + "name": "knn", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "KnnRetriever", + "namespace": "_types" + } + } + }, + { + "description": "A retriever that produces top documents from reciprocal rank fusion (RRF).", + "name": "rrf", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "RRFRetriever", + "namespace": "_types" + } + } + }, + { + "description": "A retriever that reranks the top documents based on a reranking model using the InferenceAPI", + "name": "text_similarity_reranker", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "TextSimilarityReranker", + "namespace": "_types" + } + } + }, + { + "description": "A retriever that replaces the functionality of a rule query.", + "name": "rule", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "RuleRetriever", + "namespace": "_types" + } } } + ], + "specLocation": "_types/Retriever.ts#L28-L42", + "variants": { + "kind": "container" } }, { - "codegenNames": [ - "enabled", - "count" - ], - "description": "Number of hits matching the query to count accurately. If true, the exact\nnumber of hits is returned at the cost of some performance. If false, the\nresponse does not include the total number of hits matching the query.\nDefaults to 10,000 hits.", - "kind": "type_alias", + "inherits": { + "type": { + "name": "RetrieverBase", + "namespace": "_types" + } + }, + "kind": "interface", "name": { - "name": "TrackHits", - "namespace": "_global.search._types" + "name": "StandardRetriever", + "namespace": "_types" }, - "specLocation": "_global/search/_types/hits.ts#L143-L151", - "type": { - "items": [ - { + "properties": [ + { + "description": "Defines a query to retrieve a set of top documents.", + "name": "query", + "required": false, + "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "QueryContainer", + "namespace": "_types.query_dsl" } - }, - { + } + }, + { + "description": "Defines a search after object parameter used for pagination.", + "name": "search_after", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SortResults", + "namespace": "_types" + } + } + }, + { + "description": "Maximum number of documents to collect for each shard.", + "name": "terminate_after", + "required": false, + "type": { "kind": "instance_of", "type": { "name": "integer", "namespace": "_types" } } - ], - "kind": "union_of" - } + }, + { + "description": "A sort object that that specifies the order of matching documents.", + "name": "sort", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Sort", + "namespace": "_types" + } + } + }, + { + "description": "Collapses the top documents by a specified key into a single top document per key.", + "name": "collapse", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FieldCollapse", + "namespace": "_global.search._types" + } + } + } + ], + "specLocation": "_types/Retriever.ts#L51-L62" }, { - "kind": "type_alias", + "kind": "interface", "name": { - "name": "RuntimeFields", - "namespace": "_types.mapping" + "name": "RetrieverBase", + "namespace": "_types" }, - "specLocation": "_types/mapping/RuntimeFields.ts#L24-L24", - "type": { - "key": { - "kind": "instance_of", + "properties": [ + { + "description": "Query to filter the documents that can match.", + "name": "filter", + "required": false, "type": { - "name": "Field", - "namespace": "_types" + "items": [ + { + "kind": "instance_of", + "type": { + "name": "QueryContainer", + "namespace": "_types.query_dsl" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "QueryContainer", + "namespace": "_types.query_dsl" + } + } + } + ], + "kind": "union_of" } }, - "kind": "dictionary_of", - "singleKey": false, + { + "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", + "name": "min_score", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } + } + ], + "specLocation": "_types/Retriever.ts#L44-L49" + }, + { + "kind": "type_alias", + "name": { + "name": "SortResults", + "namespace": "_types" + }, + "specLocation": "_types/sort.ts#L106-L106", + "type": { + "kind": "array_of", "value": { "kind": "instance_of", "type": { - "name": "RuntimeField", - "namespace": "_types.mapping" + "name": "FieldValue", + "namespace": "_types" } } } }, { + "inherits": { + "type": { + "name": "RetrieverBase", + "namespace": "_types" + } + }, "kind": "interface", "name": { - "name": "RuntimeField", - "namespace": "_types.mapping" + "name": "KnnRetriever", + "namespace": "_types" }, "properties": [ { - "description": "For type `composite`", - "name": "fields", - "required": false, + "description": "The name of the vector field to search against.", + "name": "field", + "required": true, "type": { - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "kind": "dictionary_of", - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "CompositeSubField", - "namespace": "_types.mapping" - } + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" } } }, { - "description": "For type `lookup`", - "name": "fetch_fields", + "description": "Query vector. Must have the same number of dimensions as the vector field you are searching against. You must provide a query_vector_builder or query_vector, but not both.", + "name": "query_vector", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "RuntimeFieldFetchFields", - "namespace": "_types.mapping" - } + "kind": "instance_of", + "type": { + "name": "QueryVector", + "namespace": "_types" } } }, { - "description": "A custom format for `date` type runtime fields.", - "docId": "mapping-date-format", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html", - "name": "format", + "description": "Defines a model to build a query vector.", + "name": "query_vector_builder", "required": false, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "QueryVectorBuilder", + "namespace": "_types" } } }, { - "description": "For type `lookup`", - "name": "input_field", - "required": false, + "description": "Number of nearest neighbors to return as top hits.", + "name": "k", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "Field", + "name": "integer", "namespace": "_types" } } }, { - "description": "For type `lookup`", - "name": "target_field", + "description": "Number of nearest neighbor candidates to consider per shard.", + "name": "num_candidates", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The minimum similarity required for a document to be considered a match.", + "name": "similarity", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Field", + "name": "float", "namespace": "_types" } } }, { - "description": "For type `lookup`", - "name": "target_index", + "availability": { + "serverless": { + "stability": "experimental" + }, + "stack": { + "since": "8.18.0", + "stability": "experimental" + } + }, + "description": "Apply oversampling and rescoring to quantized vectors *", + "name": "rescore_vector", "required": false, "type": { "kind": "instance_of", "type": { - "name": "IndexName", + "name": "RescoreVector", "namespace": "_types" } } + } + ], + "specLocation": "_types/Retriever.ts#L64-L82" + }, + { + "inherits": { + "type": { + "name": "RetrieverBase", + "namespace": "_types" + } + }, + "kind": "interface", + "name": { + "name": "RRFRetriever", + "namespace": "_types" + }, + "properties": [ + { + "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", + "name": "retrievers", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RetrieverContainer", + "namespace": "_types" + } + } + } }, { - "description": "Painless script executed at query time.", - "name": "script", + "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", + "name": "rank_constant", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Script", + "name": "integer", "namespace": "_types" } } }, { - "description": "Field type, which can be: `boolean`, `composite`, `date`, `double`, `geo_point`, `ip`,`keyword`, `long`, or `lookup`.", - "name": "type", - "required": true, + "description": "This value determines the size of the individual result sets per query.", + "name": "rank_window_size", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "RuntimeFieldType", - "namespace": "_types.mapping" + "name": "integer", + "namespace": "_types" } } } ], - "specLocation": "_types/mapping/RuntimeFields.ts#L26-L50" + "specLocation": "_types/Retriever.ts#L84-L91" }, { + "inherits": { + "type": { + "name": "RetrieverBase", + "namespace": "_types" + } + }, "kind": "interface", "name": { - "name": "CompositeSubField", - "namespace": "_types.mapping" + "name": "TextSimilarityReranker", + "namespace": "_types" }, "properties": [ { - "name": "type", + "description": "The nested retriever which will produce the first-level results, that will later be used for reranking.", + "name": "retriever", "required": true, "type": { "kind": "instance_of", "type": { - "name": "RuntimeFieldType", - "namespace": "_types.mapping" + "name": "RetrieverContainer", + "namespace": "_types" } } - } - ], - "specLocation": "_types/mapping/RuntimeFields.ts#L52-L54" - }, - { - "kind": "enum", - "members": [ - { - "name": "boolean" - }, - { - "name": "composite" - }, - { - "name": "date" }, { - "name": "double" - }, - { - "name": "geo_point" - }, - { - "name": "geo_shape" - }, - { - "name": "ip" + "description": "This value determines how many documents we will consider from the nested retriever.", + "name": "rank_window_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } }, { - "name": "keyword" + "description": "Unique identifier of the inference endpoint created using the inference API.", + "name": "inference_id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } }, { - "name": "long" + "description": "The text snippet used as the basis for similarity comparison", + "name": "inference_text", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } }, { - "name": "lookup" + "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", + "name": "field", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } } ], - "name": { - "name": "RuntimeFieldType", - "namespace": "_types.mapping" - }, - "specLocation": "_types/mapping/RuntimeFields.ts#L62-L73" + "specLocation": "_types/Retriever.ts#L93-L104" }, { + "inherits": { + "type": { + "name": "RetrieverBase", + "namespace": "_types" + } + }, "kind": "interface", "name": { - "name": "RuntimeFieldFetchFields", - "namespace": "_types.mapping" + "name": "RuleRetriever", + "namespace": "_types" }, "properties": [ { - "name": "field", + "description": "The ruleset IDs containing the rules this retriever is evaluating against.", + "name": "ruleset_ids", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + }, + { + "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", + "name": "match_criteria", + "required": true, + "type": { + "kind": "user_defined_value" + } + }, + { + "description": "The retriever whose results rules should be applied to.", + "name": "retriever", "required": true, "type": { "kind": "instance_of", "type": { - "name": "Field", + "name": "RetrieverContainer", "namespace": "_types" } } }, { - "name": "format", + "description": "This value determines the size of the individual result set.", + "name": "rank_window_size", "required": false, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "integer", + "namespace": "_types" } } } ], - "shortcutProperty": "field", - "specLocation": "_types/mapping/RuntimeFields.ts#L56-L60" + "specLocation": "_types/Retriever.ts#L106-L115" }, { "kind": "interface", "name": { - "name": "PointInTimeReference", - "namespace": "_global.search._types" + "name": "SlicedScroll", + "namespace": "_types" }, "properties": [ + { + "name": "field", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + }, { "name": "id", "required": true, @@ -73869,18 +74271,18 @@ } }, { - "name": "keep_alive", - "required": false, + "name": "max", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "Duration", + "name": "integer", "namespace": "_types" } } } ], - "specLocation": "_global/search/_types/PointInTimeReference.ts#L23-L26" + "specLocation": "_types/SlicedScroll.ts#L23-L27" }, { "attachedBehaviors": [ @@ -75216,6 +75618,280 @@ }, "specLocation": "_global/search/_types/suggester.ts#L472-L493" }, + { + "kind": "interface", + "name": { + "name": "PointInTimeReference", + "namespace": "_global.search._types" + }, + "properties": [ + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "keep_alive", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "_global/search/_types/PointInTimeReference.ts#L23-L26" + }, + { + "kind": "type_alias", + "name": { + "name": "RuntimeFields", + "namespace": "_types.mapping" + }, + "specLocation": "_types/mapping/RuntimeFields.ts#L24-L24", + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "RuntimeField", + "namespace": "_types.mapping" + } + } + } + }, + { + "kind": "interface", + "name": { + "name": "RuntimeField", + "namespace": "_types.mapping" + }, + "properties": [ + { + "description": "For type `composite`", + "name": "fields", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "CompositeSubField", + "namespace": "_types.mapping" + } + } + } + }, + { + "description": "For type `lookup`", + "name": "fetch_fields", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RuntimeFieldFetchFields", + "namespace": "_types.mapping" + } + } + } + }, + { + "description": "A custom format for `date` type runtime fields.", + "docId": "mapping-date-format", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html", + "name": "format", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "For type `lookup`", + "name": "input_field", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + }, + { + "description": "For type `lookup`", + "name": "target_field", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + }, + { + "description": "For type `lookup`", + "name": "target_index", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } + }, + { + "description": "Painless script executed at query time.", + "name": "script", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Script", + "namespace": "_types" + } + } + }, + { + "description": "Field type, which can be: `boolean`, `composite`, `date`, `double`, `geo_point`, `ip`,`keyword`, `long`, or `lookup`.", + "name": "type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "RuntimeFieldType", + "namespace": "_types.mapping" + } + } + } + ], + "specLocation": "_types/mapping/RuntimeFields.ts#L26-L50" + }, + { + "kind": "interface", + "name": { + "name": "CompositeSubField", + "namespace": "_types.mapping" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "RuntimeFieldType", + "namespace": "_types.mapping" + } + } + } + ], + "specLocation": "_types/mapping/RuntimeFields.ts#L52-L54" + }, + { + "kind": "enum", + "members": [ + { + "name": "boolean" + }, + { + "name": "composite" + }, + { + "name": "date" + }, + { + "name": "double" + }, + { + "name": "geo_point" + }, + { + "name": "geo_shape" + }, + { + "name": "ip" + }, + { + "name": "keyword" + }, + { + "name": "long" + }, + { + "name": "lookup" + } + ], + "name": { + "name": "RuntimeFieldType", + "namespace": "_types.mapping" + }, + "specLocation": "_types/mapping/RuntimeFields.ts#L62-L73" + }, + { + "kind": "interface", + "name": { + "name": "RuntimeFieldFetchFields", + "namespace": "_types.mapping" + }, + "properties": [ + { + "name": "field", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + }, + { + "name": "format", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "shortcutProperty": "field", + "specLocation": "_types/mapping/RuntimeFields.ts#L56-L60" + }, { "codegenNames": [ "result", @@ -75232,7 +75908,7 @@ "name": "ResponseItem", "namespace": "_global.msearch" }, - "specLocation": "_global/msearch/types.ts#L211-L214", + "specLocation": "_global/msearch/types.ts#L53-L56", "type": { "items": [ { @@ -75302,7 +75978,7 @@ } } ], - "specLocation": "_global/msearch/types.ts#L216-L219" + "specLocation": "_global/msearch/types.ts#L58-L61" }, { "generics": [ @@ -84674,6 +85350,37 @@ "kind": "union_of" } }, + { + "codegenNames": [ + "script_string", + "script_template" + ], + "kind": "type_alias", + "name": { + "name": "ScriptSource", + "namespace": "_types" + }, + "specLocation": "_types/Scripting.ts#L48-L49", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "SearchRequestBody", + "namespace": "_global.search._types" + } + } + ], + "kind": "union_of" + } + }, { "kind": "type_alias", "name": { @@ -108277,49 +108984,6 @@ ], "specLocation": "async_search/status/AsyncSearchStatusResponse.ts#L24-L38" }, - { - "kind": "interface", - "name": { - "name": "SlicedScroll", - "namespace": "_types" - }, - "properties": [ - { - "name": "field", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Field", - "namespace": "_types" - } - } - }, - { - "name": "id", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" - } - } - }, - { - "name": "max", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - } - ], - "specLocation": "_types/SlicedScroll.ts#L23-L27" - }, { "kind": "interface", "name": { @@ -120681,13 +121345,13 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } ], - "specLocation": "_types/Scripting.ts#L47-L59" + "specLocation": "_types/Scripting.ts#L51-L63" }, { "kind": "interface", @@ -142826,7 +143490,7 @@ } } ], - "specLocation": "_global/msearch/types.ts#L206-L209" + "specLocation": "_global/msearch/types.ts#L48-L51" }, { "kind": "interface", @@ -144650,507 +145314,6 @@ ], "specLocation": "_global/scripts_painless_execute/types.ts#L27-L46" }, - { - "kind": "interface", - "name": { - "name": "RetrieverContainer", - "namespace": "_types" - }, - "properties": [ - { - "description": "A retriever that replaces the functionality of a traditional query.", - "name": "standard", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "StandardRetriever", - "namespace": "_types" - } - } - }, - { - "description": "A retriever that replaces the functionality of a knn search.", - "name": "knn", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "KnnRetriever", - "namespace": "_types" - } - } - }, - { - "description": "A retriever that produces top documents from reciprocal rank fusion (RRF).", - "name": "rrf", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RRFRetriever", - "namespace": "_types" - } - } - }, - { - "description": "A retriever that reranks the top documents based on a reranking model using the InferenceAPI", - "name": "text_similarity_reranker", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "TextSimilarityReranker", - "namespace": "_types" - } - } - }, - { - "description": "A retriever that replaces the functionality of a rule query.", - "name": "rule", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RuleRetriever", - "namespace": "_types" - } - } - } - ], - "specLocation": "_types/Retriever.ts#L28-L42", - "variants": { - "kind": "container" - } - }, - { - "inherits": { - "type": { - "name": "RetrieverBase", - "namespace": "_types" - } - }, - "kind": "interface", - "name": { - "name": "StandardRetriever", - "namespace": "_types" - }, - "properties": [ - { - "description": "Defines a query to retrieve a set of top documents.", - "name": "query", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" - } - } - }, - { - "description": "Defines a search after object parameter used for pagination.", - "name": "search_after", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortResults", - "namespace": "_types" - } - } - }, - { - "description": "Maximum number of documents to collect for each shard.", - "name": "terminate_after", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "description": "A sort object that that specifies the order of matching documents.", - "name": "sort", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Sort", - "namespace": "_types" - } - } - }, - { - "description": "Collapses the top documents by a specified key into a single top document per key.", - "name": "collapse", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "FieldCollapse", - "namespace": "_global.search._types" - } - } - } - ], - "specLocation": "_types/Retriever.ts#L51-L62" - }, - { - "kind": "interface", - "name": { - "name": "RetrieverBase", - "namespace": "_types" - }, - "properties": [ - { - "description": "Query to filter the documents that can match.", - "name": "filter", - "required": false, - "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" - } - }, - { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" - } - } - } - ], - "kind": "union_of" - } - }, - { - "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", - "name": "min_score", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "float", - "namespace": "_types" - } - } - } - ], - "specLocation": "_types/Retriever.ts#L44-L49" - }, - { - "inherits": { - "type": { - "name": "RetrieverBase", - "namespace": "_types" - } - }, - "kind": "interface", - "name": { - "name": "KnnRetriever", - "namespace": "_types" - }, - "properties": [ - { - "description": "The name of the vector field to search against.", - "name": "field", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "description": "Query vector. Must have the same number of dimensions as the vector field you are searching against. You must provide a query_vector_builder or query_vector, but not both.", - "name": "query_vector", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "QueryVector", - "namespace": "_types" - } - } - }, - { - "description": "Defines a model to build a query vector.", - "name": "query_vector_builder", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "QueryVectorBuilder", - "namespace": "_types" - } - } - }, - { - "description": "Number of nearest neighbors to return as top hits.", - "name": "k", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "description": "Number of nearest neighbor candidates to consider per shard.", - "name": "num_candidates", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "description": "The minimum similarity required for a document to be considered a match.", - "name": "similarity", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "float", - "namespace": "_types" - } - } - }, - { - "availability": { - "serverless": { - "stability": "experimental" - }, - "stack": { - "since": "8.18.0", - "stability": "experimental" - } - }, - "description": "Apply oversampling and rescoring to quantized vectors *", - "name": "rescore_vector", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RescoreVector", - "namespace": "_types" - } - } - } - ], - "specLocation": "_types/Retriever.ts#L64-L82" - }, - { - "inherits": { - "type": { - "name": "RetrieverBase", - "namespace": "_types" - } - }, - "kind": "interface", - "name": { - "name": "RRFRetriever", - "namespace": "_types" - }, - "properties": [ - { - "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", - "name": "retrievers", - "required": true, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "RetrieverContainer", - "namespace": "_types" - } - } - } - }, - { - "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", - "name": "rank_constant", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "description": "This value determines the size of the individual result sets per query.", - "name": "rank_window_size", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - } - ], - "specLocation": "_types/Retriever.ts#L84-L91" - }, - { - "inherits": { - "type": { - "name": "RetrieverBase", - "namespace": "_types" - } - }, - "kind": "interface", - "name": { - "name": "TextSimilarityReranker", - "namespace": "_types" - }, - "properties": [ - { - "description": "The nested retriever which will produce the first-level results, that will later be used for reranking.", - "name": "retriever", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "RetrieverContainer", - "namespace": "_types" - } - } - }, - { - "description": "This value determines how many documents we will consider from the nested retriever.", - "name": "rank_window_size", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "description": "Unique identifier of the inference endpoint created using the inference API.", - "name": "inference_id", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "description": "The text snippet used as the basis for similarity comparison", - "name": "inference_text", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", - "name": "field", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - } - ], - "specLocation": "_types/Retriever.ts#L93-L104" - }, - { - "inherits": { - "type": { - "name": "RetrieverBase", - "namespace": "_types" - } - }, - "kind": "interface", - "name": { - "name": "RuleRetriever", - "namespace": "_types" - }, - "properties": [ - { - "description": "The ruleset IDs containing the rules this retriever is evaluating against.", - "name": "ruleset_ids", - "required": true, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" - } - } - } - }, - { - "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", - "name": "match_criteria", - "required": true, - "type": { - "kind": "user_defined_value" - } - }, - { - "description": "The retriever whose results rules should be applied to.", - "name": "retriever", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "RetrieverContainer", - "namespace": "_types" - } - } - }, - { - "description": "This value determines the size of the individual result set.", - "name": "rank_window_size", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - } - ], - "specLocation": "_types/Retriever.ts#L106-L115" - }, { "inherits": { "type": { diff --git a/output/schema/schema.json b/output/schema/schema.json index d0503ea97a..e9862de960 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -31173,7 +31173,7 @@ } } ], - "specLocation": "_global/msearch/types.ts#L216-L219" + "specLocation": "_global/msearch/types.ts#L58-L61" }, { "kind": "interface", @@ -31223,70 +31223,41 @@ } } ], - "specLocation": "_global/msearch/types.ts#L206-L209" + "specLocation": "_global/msearch/types.ts#L48-L51" }, { "kind": "interface", + "description": "Contains parameters used to limit or change the subsequent search body request.", "name": { - "name": "MultisearchBody", + "name": "MultisearchHeader", "namespace": "_global.msearch" }, "properties": [ { - "aliases": [ - "aggs" - ], - "extDocId": "search-aggregations", - "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html", - "name": "aggregations", - "required": false, - "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "AggregationContainer", - "namespace": "_types.aggregations" - } - } - } - }, - { - "name": "collapse", + "name": "allow_no_indices", "required": false, "type": { "kind": "instance_of", "type": { - "name": "FieldCollapse", - "namespace": "_global.search._types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "Defines the search definition using the Query DSL.", - "name": "query", + "name": "expand_wildcards", "required": false, "type": { "kind": "instance_of", "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" + "name": "ExpandWildcards", + "namespace": "_types" } } }, { - "description": "If true, returns detailed information about score computation as part of a hit.", - "name": "explain", + "name": "ignore_unavailable", "required": false, - "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -31296,159 +31267,144 @@ } }, { - "description": "Configuration of search extensions defined by Elasticsearch plugins.", - "name": "ext", + "name": "index", "required": false, "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, - "value": { - "kind": "user_defined_value" + "kind": "instance_of", + "type": { + "name": "Indices", + "namespace": "_types" } } }, { - "description": "List of stored fields to return as part of a hit. If no fields are specified,\nno stored fields are included in the response. If this field is specified, the _source\nparameter defaults to false. You can pass _source: true to return both source fields\nand stored fields in the search response.", - "name": "stored_fields", + "name": "preference", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Fields", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } } }, { - "description": "Array of wildcard (*) patterns. The request returns doc values for field\nnames matching these patterns in the hits.fields property of the response.", - "name": "docvalue_fields", + "name": "request_cache", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "FieldAndFormat", - "namespace": "_types.query_dsl" - } + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" } } }, { - "availability": { - "serverless": {}, - "stack": { - "since": "8.4.0" - } - }, - "description": "Defines the approximate kNN search to run.", - "name": "knn", + "name": "routing", "required": false, "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "KnnSearch", - "namespace": "_types" - } - }, - { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "KnnSearch", - "namespace": "_types" - } - } - } - ] + "kind": "instance_of", + "type": { + "name": "Routing", + "namespace": "_types" + } } }, { - "description": "Starting document offset. By default, you cannot page through more than 10,000\nhits using the from and size parameters. To page through more hits, use the\nsearch_after parameter.", - "name": "from", + "name": "search_type", "required": false, - "serverDefault": 0, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "SearchType", "namespace": "_types" } } }, { - "name": "highlight", + "name": "ccs_minimize_roundtrips", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Highlight", - "namespace": "_global.search._types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "Boosts the _score of documents from specified indices.", - "name": "indices_boost", + "name": "allow_partial_search_results", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - }, - "singleKey": true, - "value": { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - } + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in the search results.", - "name": "min_score", + "name": "ignore_throttled", "required": false, "type": { "kind": "instance_of", "type": { - "name": "double", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } - }, + } + ], + "specLocation": "_global/msearch/types.ts#L31-L46" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "value", + "codegenName": "searches", + "value": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "RequestItem", + "namespace": "_global.msearch" + } + } + } + }, + "description": "Run multiple searches.\n\nThe format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "_global.msearch" + }, + "path": [ { - "name": "post_filter", + "description": "Comma-separated list of data streams, indices, and index aliases to search.", + "name": "index", "required": false, "type": { "kind": "instance_of", "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" + "name": "Indices", + "namespace": "_types" } } - }, + } + ], + "query": [ { - "name": "profile", + "description": "If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.", + "name": "allow_no_indices", "required": false, "type": { "kind": "instance_of", @@ -31459,123 +31415,88 @@ } }, { - "name": "rescore", + "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", + "docId": "ccs-network-delays", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cross-cluster-search.html#ccs-network-delays", + "name": "ccs_minimize_roundtrips", "required": false, + "serverDefault": true, "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "Rescore", - "namespace": "_global.search._types" - } - }, - { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "Rescore", - "namespace": "_global.search._types" - } - } - } - ] + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } } }, { - "description": "Retrieve a script evaluation (based on different fields) for each hit.", - "name": "script_fields", + "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.", + "name": "expand_wildcards", "required": false, "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "ScriptField", - "namespace": "_types" - } + "kind": "instance_of", + "type": { + "name": "ExpandWildcards", + "namespace": "_types" } } }, { - "name": "search_after", + "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", + "name": "ignore_throttled", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "SortResults", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "The number of hits to return. By default, you cannot page through more\nthan 10,000 hits using the from and size parameters. To page through more\nhits, use the search_after parameter.", - "name": "size", + "description": "If true, missing or closed indices are not included in the response.", + "name": "ignore_unavailable", "required": false, - "serverDefault": 10, + "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "integer", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "docId": "sort-search-results", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html", - "name": "sort", + "description": "Indicates whether hit.matched_queries should be rendered as a map that includes\nthe name of the matched query associated with its score (true)\nor as an array containing the name of the matched queries (false)\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", + "name": "include_named_queries_score", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "Sort", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "Indicates which source fields are returned for matching documents. These\nfields are returned in the hits._source property of the search response.", - "name": "_source", + "description": "Maximum number of concurrent searches the multi search API can execute.", + "name": "max_concurrent_searches", "required": false, "type": { "kind": "instance_of", "type": { - "name": "SourceConfig", - "namespace": "_global.search._types" - } - } - }, - { - "description": "Array of wildcard (*) patterns. The request returns values for field names\nmatching these patterns in the hits.fields property of the response.", - "name": "fields", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "FieldAndFormat", - "namespace": "_types.query_dsl" - } + "name": "long", + "namespace": "_types" } } }, { - "description": "Maximum number of documents to collect for each shard. If a query reaches this\nlimit, Elasticsearch terminates the query early. Elasticsearch collects documents\nbefore sorting. Defaults to 0, which does not terminate query execution early.", - "name": "terminate_after", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "name": "max_concurrent_shard_requests", "required": false, - "serverDefault": 0, + "serverDefault": 5, "type": { "kind": "instance_of", "type": { @@ -31585,35 +31506,20 @@ } }, { - "description": "Stats groups to associate with the search. Each group maintains a statistics\naggregation for its associated searches. You can retrieve these stats using\nthe indices stats API.", - "name": "stats", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - } - }, - { - "description": "Specifies the period of time to wait for a response from each shard. If no response\nis received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", - "name": "timeout", + "description": "Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.", + "name": "pre_filter_shard_size", "required": false, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } }, { - "description": "If true, calculate and return document scores, even if the scores are not used for sorting.", - "name": "track_scores", + "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", + "name": "rest_total_hits_as_int", "required": false, "serverDefault": false, "type": { @@ -31625,45 +31531,32 @@ } }, { - "description": "Number of hits matching the query to count accurately. If true, the exact\nnumber of hits is returned at the cost of some performance. If false, the\nresponse does not include the total number of hits matching the query.\nDefaults to 10,000 hits.", - "name": "track_total_hits", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "TrackHits", - "namespace": "_global.search._types" - } - } - }, - { - "description": "If true, returns document version as part of a hit.", - "name": "version", + "description": "Custom routing value used to route search operations to a specific shard.", + "name": "routing", "required": false, - "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "Routing", + "namespace": "_types" } } }, { - "description": "Defines one or more runtime fields in the search request. These fields take\nprecedence over mapped fields with the same name.", - "name": "runtime_mappings", + "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", + "name": "search_type", "required": false, "type": { "kind": "instance_of", "type": { - "name": "RuntimeFields", - "namespace": "_types.mapping" + "name": "SearchType", + "namespace": "_types" } } }, { - "description": "If true, returns sequence number and primary term of the last modification\nof each hit. See Optimistic concurrency control.", - "name": "seq_no_primary_term", + "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", + "name": "typed_keys", "required": false, "type": { "kind": "instance_of", @@ -31672,99 +31565,177 @@ "namespace": "_builtins" } } - }, - { - "description": "Limits the search to a point in time (PIT). If you provide a PIT, you\ncannot specify an in the request path.", - "name": "pit", - "required": false, - "type": { + } + ], + "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L135" + }, + { + "kind": "type_alias", + "codegenNames": [ + "header", + "body" + ], + "name": { + "name": "RequestItem", + "namespace": "_global.msearch" + }, + "specLocation": "_global/msearch/types.ts#L26-L29", + "type": { + "kind": "union_of", + "items": [ + { "kind": "instance_of", "type": { - "name": "PointInTimeReference", - "namespace": "_global.search._types" + "name": "MultisearchHeader", + "namespace": "_global.msearch" } - } - }, - { - "name": "suggest", - "required": false, - "type": { + }, + { "kind": "instance_of", "type": { - "name": "Suggester", + "name": "SearchRequestBody", "namespace": "_global.search._types" } } + ] + } + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "result", + "value": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "TDocument", + "namespace": "_global.msearch.Response" + } + } + ], + "type": { + "name": "MultiSearchResult", + "namespace": "_global.msearch" + } + } + }, + "generics": [ + { + "name": "TDocument", + "namespace": "_global.msearch.Response" } ], - "specLocation": "_global/msearch/types.ts#L70-L204" + "name": { + "name": "Response", + "namespace": "_global.msearch" + }, + "specLocation": "_global/msearch/MultiSearchResponse.ts#L25-L28" }, { - "kind": "interface", - "description": "Contains parameters used to limit or change the subsequent search body request.", + "kind": "type_alias", + "codegenNames": [ + "result", + "failure" + ], + "generics": [ + { + "name": "TDocument", + "namespace": "_global.msearch.ResponseItem" + } + ], "name": { - "name": "MultisearchHeader", + "name": "ResponseItem", "namespace": "_global.msearch" }, - "properties": [ - { - "name": "allow_no_indices", - "required": false, - "type": { + "specLocation": "_global/msearch/types.ts#L53-L56", + "type": { + "kind": "union_of", + "items": [ + { "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "TDocument", + "namespace": "_global.msearch.ResponseItem" + } + } + ], "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "MultiSearchItem", + "namespace": "_global.msearch" } - } - }, - { - "name": "expand_wildcards", - "required": false, - "type": { + }, + { "kind": "instance_of", "type": { - "name": "ExpandWildcards", + "name": "ErrorResponseBase", "namespace": "_types" } } - }, - { - "name": "ignore_unavailable", - "required": false, - "type": { + ] + } + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "value", + "codegenName": "search_templates", + "value": { + "kind": "array_of", + "value": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "RequestItem", + "namespace": "_global.msearch_template" } } - }, - { - "name": "index", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Indices", - "namespace": "_types" - } - } - }, + } + }, + "description": "Run multiple templated searches.\n\nRun multiple templated searches with a single request.\nIf you are providing a text file or text input to `curl`, use the `--data-binary` flag instead of `-d` to preserve newlines.\nFor example:\n\n```\n$ cat requests\n{ \"index\": \"my-index\" }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ \"index\": \"my-other-index\" }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}\n\n$ curl -H \"Content-Type: application/x-ndjson\" -XGET localhost:9200/_msearch/template --data-binary \"@requests\"; echo\n```", + "examples": { + "MultiSearchTemplateRequestExample1": { + "description": "Run `GET my-index/_msearch/template` to run multiple templated searches.", + "value": "{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" + } + }, + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "_global.msearch_template" + }, + "path": [ { - "name": "preference", + "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*`.", + "name": "index", "required": false, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "Indices", + "namespace": "_types" } } - }, + } + ], + "query": [ { - "name": "request_cache", + "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", + "name": "ccs_minimize_roundtrips", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -31774,17 +31745,19 @@ } }, { - "name": "routing", + "description": "The maximum number of concurrent searches the API can run.", + "name": "max_concurrent_searches", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Routing", + "name": "long", "namespace": "_types" } } }, { + "description": "The type of the search operation.", "name": "search_type", "required": false, "type": { @@ -31796,8 +31769,10 @@ } }, { - "name": "ccs_minimize_roundtrips", + "description": "If `true`, the response returns `hits.total` as an integer.\nIf `false`, it returns `hits.total` as an object.", + "name": "rest_total_hits_as_int", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -31807,8 +31782,10 @@ } }, { - "name": "allow_partial_search_results", + "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", + "name": "typed_keys", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -31816,70 +31793,87 @@ "namespace": "_builtins" } } - }, - { - "name": "ignore_throttled", - "required": false, - "type": { + } + ], + "specLocation": "_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L116" + }, + { + "kind": "type_alias", + "codegenNames": [ + "header", + "body" + ], + "name": { + "name": "RequestItem", + "namespace": "_global.msearch_template" + }, + "specLocation": "_global/msearch_template/types.ts#L25-L26", + "type": { + "kind": "union_of", + "items": [ + { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "MultisearchHeader", + "namespace": "_global.msearch" + } + }, + { + "kind": "instance_of", + "type": { + "name": "TemplateConfig", + "namespace": "_global.msearch_template" } } - } - ], - "specLocation": "_global/msearch/types.ts#L52-L67" + ] + } }, { - "kind": "request", - "attachedBehaviors": [ - "CommonQueryParameters" - ], + "kind": "response", "body": { "kind": "value", - "codegenName": "searches", + "codegenName": "result", "value": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "RequestItem", - "namespace": "_global.msearch" + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "TDocument", + "namespace": "_global.msearch_template.Response" + } } + ], + "type": { + "name": "MultiSearchResult", + "namespace": "_global.msearch" } } }, - "description": "Run multiple searches.\n\nThe format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", - "inherits": { - "type": { - "name": "RequestBase", - "namespace": "_types" + "generics": [ + { + "name": "TDocument", + "namespace": "_global.msearch_template.Response" } + ], + "name": { + "name": "Response", + "namespace": "_global.msearch_template" }, + "specLocation": "_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L33" + }, + { + "kind": "interface", "name": { - "name": "Request", - "namespace": "_global.msearch" + "name": "TemplateConfig", + "namespace": "_global.msearch_template" }, - "path": [ - { - "description": "Comma-separated list of data streams, indices, and index aliases to search.", - "name": "index", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Indices", - "namespace": "_types" - } - } - } - ], - "query": [ + "properties": [ { - "description": "If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.", - "name": "allow_no_indices", + "description": "If `true`, returns detailed information about score calculation as part of each hit.", + "name": "explain", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -31889,35 +31883,39 @@ } }, { - "description": "If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.", - "docId": "ccs-network-delays", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cross-cluster-search.html#ccs-network-delays", - "name": "ccs_minimize_roundtrips", + "description": "The ID of the search template to use. If no `source` is specified,\nthis parameter is required.", + "name": "id", "required": false, - "serverDefault": true, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "Id", + "namespace": "_types" } } }, { - "description": "Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.", - "name": "expand_wildcards", + "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", + "name": "params", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "ExpandWildcards", - "namespace": "_types" + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "user_defined_value" } } }, { - "description": "If true, concrete, expanded or aliased indices are ignored when frozen.", - "name": "ignore_throttled", + "description": "If `true`, the query execution is profiled.", + "name": "profile", "required": false, "serverDefault": false, "type": { @@ -31929,73 +31927,76 @@ } }, { - "description": "If true, missing or closed indices are not included in the response.", - "name": "ignore_unavailable", + "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", + "name": "source", "required": false, - "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "boolean", + "name": "string", "namespace": "_builtins" } } - }, + } + ], + "specLocation": "_global/msearch_template/types.ts#L28-L54" + }, + { + "kind": "interface", + "name": { + "name": "Operation", + "namespace": "_global.mtermvectors" + }, + "properties": [ { - "description": "Indicates whether hit.matched_queries should be rendered as a map that includes\nthe name of the matched query associated with its score (true)\nor as an array containing the name of the matched queries (false)\nThis functionality reruns each named query on every hit in a search response.\nTypically, this adds a small overhead to a request.\nHowever, using computationally expensive named queries on a large number of hits may add significant overhead.", - "name": "include_named_queries_score", + "description": "The ID of the document.", + "name": "_id", "required": false, - "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "Id", + "namespace": "_types" } } }, { - "description": "Maximum number of concurrent searches the multi search API can execute.", - "name": "max_concurrent_searches", + "description": "The index of the document.", + "name": "_index", "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "IndexName", "namespace": "_types" } } }, { - "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", - "name": "max_concurrent_shard_requests", + "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", + "name": "doc", "required": false, - "serverDefault": 5, "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } + "kind": "user_defined_value" } }, { - "description": "Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.", - "name": "pre_filter_shard_size", + "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.\nUsed as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "name": "fields", "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "Fields", "namespace": "_types" } } }, { - "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", - "name": "rest_total_hits_as_int", + "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", + "name": "field_statistics", "required": false, - "serverDefault": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -32005,33 +32006,35 @@ } }, { - "description": "Custom routing value used to route search operations to a specific shard.", - "name": "routing", + "description": "Filter terms based on their tf-idf scores.", + "name": "filter", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Routing", - "namespace": "_types" - } + "name": "Filter", + "namespace": "_global.termvectors" + } } }, { - "description": "Indicates whether global term and document frequencies should be used when scoring returned documents.", - "name": "search_type", + "description": "If `true`, the response includes term offsets.", + "name": "offsets", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { - "name": "SearchType", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "Specifies whether aggregation and suggester names should be prefixed by their respective types in the response.", - "name": "typed_keys", + "description": "If `true`, the response includes term payloads.", + "name": "payloads", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -32039,120 +32042,71 @@ "namespace": "_builtins" } } - } - ], - "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L135" - }, - { - "kind": "type_alias", - "codegenNames": [ - "header", - "body" - ], - "name": { - "name": "RequestItem", - "namespace": "_global.msearch" - }, - "specLocation": "_global/msearch/types.ts#L47-L50", - "type": { - "kind": "union_of", - "items": [ - { + }, + { + "description": "If `true`, the response includes term positions.", + "name": "positions", + "required": false, + "serverDefault": true, + "type": { "kind": "instance_of", "type": { - "name": "MultisearchHeader", - "namespace": "_global.msearch" + "name": "boolean", + "namespace": "_builtins" } - }, - { + } + }, + { + "description": "Custom value used to route operations to a specific shard.", + "name": "routing", + "required": false, + "type": { "kind": "instance_of", "type": { - "name": "MultisearchBody", - "namespace": "_global.msearch" + "name": "Routing", + "namespace": "_types" } } - ] - } - }, - { - "kind": "response", - "body": { - "kind": "value", - "codegenName": "result", - "value": { - "kind": "instance_of", - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "TDocument", - "namespace": "_global.msearch.Response" - } - } - ], + }, + { + "description": "If true, the response includes term frequency and document frequency.", + "name": "term_statistics", + "required": false, + "serverDefault": false, "type": { - "name": "MultiSearchResult", - "namespace": "_global.msearch" + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } } - } - }, - "generics": [ - { - "name": "TDocument", - "namespace": "_global.msearch.Response" - } - ], - "name": { - "name": "Response", - "namespace": "_global.msearch" - }, - "specLocation": "_global/msearch/MultiSearchResponse.ts#L25-L28" - }, - { - "kind": "type_alias", - "codegenNames": [ - "result", - "failure" - ], - "generics": [ + }, { - "name": "TDocument", - "namespace": "_global.msearch.ResponseItem" - } - ], - "name": { - "name": "ResponseItem", - "namespace": "_global.msearch" - }, - "specLocation": "_global/msearch/types.ts#L211-L214", - "type": { - "kind": "union_of", - "items": [ - { + "description": "If `true`, returns the document version as part of a hit.", + "name": "version", + "required": false, + "type": { "kind": "instance_of", - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "TDocument", - "namespace": "_global.msearch.ResponseItem" - } - } - ], "type": { - "name": "MultiSearchItem", - "namespace": "_global.msearch" + "name": "VersionNumber", + "namespace": "_types" } - }, - { + } + }, + { + "description": "Specific version type.", + "name": "version_type", + "required": false, + "type": { "kind": "instance_of", "type": { - "name": "ErrorResponseBase", + "name": "VersionType", "namespace": "_types" } } - ] - } + } + ], + "specLocation": "_global/mtermvectors/types.ts#L35-L94" }, { "kind": "request", @@ -32160,24 +32114,56 @@ "CommonQueryParameters" ], "body": { - "kind": "value", - "codegenName": "search_templates", - "value": { - "kind": "array_of", - "value": { - "kind": "instance_of", + "kind": "properties", + "properties": [ + { + "description": "An array of existing or artificial documents.", + "name": "docs", + "required": false, "type": { - "name": "RequestItem", - "namespace": "_global.msearch_template" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Operation", + "namespace": "_global.mtermvectors" + } + } + } + }, + { + "description": "A simplified syntax to specify documents by their ID if they're in the same index.", + "name": "ids", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } } } - } + ] }, - "description": "Run multiple templated searches.\n\nRun multiple templated searches with a single request.\nIf you are providing a text file or text input to `curl`, use the `--data-binary` flag instead of `-d` to preserve newlines.\nFor example:\n\n```\n$ cat requests\n{ \"index\": \"my-index\" }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ \"index\": \"my-other-index\" }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}\n\n$ curl -H \"Content-Type: application/x-ndjson\" -XGET localhost:9200/_msearch/template --data-binary \"@requests\"; echo\n```", + "description": "Get multiple term vectors.\n\nGet multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.\n\n**Artificial documents**\n\nYou can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.\nThe mapping used is determined by the specified `_index`.", "examples": { - "MultiSearchTemplateRequestExample1": { - "description": "Run `GET my-index/_msearch/template` to run multiple templated searches.", - "value": "{ }\n{ \"id\": \"my-search-template\", \"params\": { \"query_string\": \"hello world\", \"from\": 0, \"size\": 10 }}\n{ }\n{ \"id\": \"my-other-search-template\", \"params\": { \"query_type\": \"match_all\" }}" + "MultiTermVectorsRequestExample1": { + "description": "Run `POST /my-index-000001/_mtermvectors`. When you specify an index in the request URI, the index does not need to be specified for each documents in the request body.\n", + "summary": "Get multiple term vectors", + "value": "{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" + }, + "MultiTermVectorsRequestExample2": { + "description": "Run `POST /my-index-000001/_mtermvectors`. If all requested documents are in same index and the parameters are the same, you can use a simplified syntax.\n", + "summary": "Simplified syntax", + "value": "{\n \"ids\": [ \"1\", \"2\" ],\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n}" + }, + "MultiTermVectorsRequestExample3": { + "description": "Run `POST /_mtermvectors` to generate term vectors for artificial documents provided in the body of the request. The mapping used is determined by the specified `_index`.\n", + "summary": "Artificial documents", + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"test test test\"\n }\n },\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"Another test ...\"\n }\n }\n ]\n}" } }, "inherits": { @@ -32188,17 +32174,17 @@ }, "name": { "name": "Request", - "namespace": "_global.msearch_template" + "namespace": "_global.mtermvectors" }, "path": [ { - "description": "A comma-separated list of data streams, indices, and aliases to search.\nIt supports wildcards (`*`).\nTo search all data streams and indices, omit this parameter or use `*`.", + "description": "The name of the index that contains the documents.", "name": "index", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Indices", + "name": "IndexName", "namespace": "_types" } } @@ -32206,47 +32192,50 @@ ], "query": [ { - "description": "If `true`, network round-trips are minimized for cross-cluster search requests.", - "name": "ccs_minimize_roundtrips", + "description": "A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body", + "name": "ids", "required": false, - "serverDefault": true, "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } } } }, { - "description": "The maximum number of concurrent searches the API can run.", - "name": "max_concurrent_searches", + "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "name": "fields", "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "Fields", "namespace": "_types" } } }, { - "description": "The type of the search operation.", - "name": "search_type", + "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", + "name": "field_statistics", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { - "name": "SearchType", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "If `true`, the response returns `hits.total` as an integer.\nIf `false`, it returns `hits.total` as an object.", - "name": "rest_total_hits_as_int", + "description": "If `true`, the response includes term offsets.", + "name": "offsets", "required": false, - "serverDefault": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -32256,10 +32245,10 @@ } }, { - "description": "If `true`, the response prefixes aggregation and suggester names with their respective types.", - "name": "typed_keys", + "description": "If `true`, the response includes term payloads.", + "name": "payloads", "required": false, - "serverDefault": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -32267,87 +32256,39 @@ "namespace": "_builtins" } } - } - ], - "specLocation": "_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L116" - }, - { - "kind": "type_alias", - "codegenNames": [ - "header", - "body" - ], - "name": { - "name": "RequestItem", - "namespace": "_global.msearch_template" - }, - "specLocation": "_global/msearch_template/types.ts#L25-L26", - "type": { - "kind": "union_of", - "items": [ - { + }, + { + "description": "If `true`, the response includes term positions.", + "name": "positions", + "required": false, + "serverDefault": true, + "type": { "kind": "instance_of", "type": { - "name": "MultisearchHeader", - "namespace": "_global.msearch" + "name": "boolean", + "namespace": "_builtins" } - }, - { + } + }, + { + "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "name": "preference", + "required": false, + "type": { "kind": "instance_of", "type": { - "name": "TemplateConfig", - "namespace": "_global.msearch_template" - } - } - ] - } - }, - { - "kind": "response", - "body": { - "kind": "value", - "codegenName": "result", - "value": { - "kind": "instance_of", - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "TDocument", - "namespace": "_global.msearch_template.Response" - } + "name": "string", + "namespace": "_builtins" } - ], - "type": { - "name": "MultiSearchResult", - "namespace": "_global.msearch" } - } - }, - "generics": [ - { - "name": "TDocument", - "namespace": "_global.msearch_template.Response" - } - ], - "name": { - "name": "Response", - "namespace": "_global.msearch_template" - }, - "specLocation": "_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L33" - }, - { - "kind": "interface", - "name": { - "name": "TemplateConfig", - "namespace": "_global.msearch_template" - }, - "properties": [ + }, { - "description": "If `true`, returns detailed information about score calculation as part of each hit.", - "name": "explain", + "description": "If true, the request is real-time as opposed to near-real-time.", + "docId": "realtime", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html#realtime", + "name": "realtime", "required": false, - "serverDefault": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -32357,73 +32298,92 @@ } }, { - "description": "The ID of the search template to use. If no `source` is specified,\nthis parameter is required.", - "name": "id", + "description": "A custom value used to route operations to a specific shard.", + "name": "routing", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Id", + "name": "Routing", "namespace": "_types" } } }, { - "description": "Key-value pairs used to replace Mustache variables in the template.\nThe key is the variable name.\nThe value is the variable value.", - "name": "params", + "description": "If true, the response includes term frequency and document frequency.", + "name": "term_statistics", "required": false, + "serverDefault": false, "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, - "value": { - "kind": "user_defined_value" + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "If `true`, the query execution is profiled.", - "name": "profile", + "description": "If `true`, returns the document version as part of a hit.", + "name": "version", "required": false, - "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "VersionNumber", + "namespace": "_types" } } }, { - "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", - "name": "source", + "description": "The version type.", + "name": "version_type", "required": false, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "VersionType", + "namespace": "_types" } } } ], - "specLocation": "_global/msearch_template/types.ts#L28-L54" + "specLocation": "_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L134" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "docs", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TermVectorsResult", + "namespace": "_global.mtermvectors" + } + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "_global.mtermvectors" + }, + "specLocation": "_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24" }, { "kind": "interface", "name": { - "name": "Operation", + "name": "TermVectorsResult", "namespace": "_global.mtermvectors" }, "properties": [ { - "description": "The ID of the document.", "name": "_id", "required": false, "type": { @@ -32435,9 +32395,8 @@ } }, { - "description": "The index of the document.", "name": "_index", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -32447,55 +32406,30 @@ } }, { - "description": "An artificial document (a document not present in the index) for which you want to retrieve term vectors.", - "name": "doc", - "required": false, - "type": { - "kind": "user_defined_value" - } - }, - { - "description": "Comma-separated list or wildcard expressions of fields to include in the statistics.\nUsed as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", - "name": "fields", + "name": "_version", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Fields", + "name": "VersionNumber", "namespace": "_types" } } }, { - "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", - "name": "field_statistics", - "required": false, - "serverDefault": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "Filter terms based on their tf-idf scores.", - "name": "filter", + "name": "took", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Filter", - "namespace": "_global.termvectors" + "name": "long", + "namespace": "_types" } } }, { - "description": "If `true`, the response includes term offsets.", - "name": "offsets", + "name": "found", "required": false, - "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -32505,82 +32439,40 @@ } }, { - "description": "If `true`, the response includes term payloads.", - "name": "payloads", + "name": "term_vectors", "required": false, - "serverDefault": true, "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "TermVector", + "namespace": "_global.termvectors" + } } } }, { - "description": "If `true`, the response includes term positions.", - "name": "positions", + "name": "error", "required": false, - "serverDefault": true, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "Custom value used to route operations to a specific shard.", - "name": "routing", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Routing", - "namespace": "_types" - } - } - }, - { - "description": "If true, the response includes term frequency and document frequency.", - "name": "term_statistics", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "If `true`, returns the document version as part of a hit.", - "name": "version", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "VersionNumber", - "namespace": "_types" - } - } - }, - { - "description": "Specific version type.", - "name": "version_type", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "VersionType", - "namespace": "_types" + "name": "ErrorCause", + "namespace": "_types" } } } ], - "specLocation": "_global/mtermvectors/types.ts#L35-L94" + "specLocation": "_global/mtermvectors/types.ts#L96-L104" }, { "kind": "request", @@ -32591,55 +32483,20 @@ "kind": "properties", "properties": [ { - "description": "An array of existing or artificial documents.", - "name": "docs", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "Operation", - "namespace": "_global.mtermvectors" - } - } - } - }, - { - "description": "A simplified syntax to specify documents by their ID if they're in the same index.", - "name": "ids", + "description": "Filter indices if the provided query rewrites to `match_none` on every shard.", + "name": "index_filter", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" - } + "kind": "instance_of", + "type": { + "name": "QueryContainer", + "namespace": "_types.query_dsl" } } } ] }, - "description": "Get multiple term vectors.\n\nGet multiple term vectors with a single request.\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.\n\n**Artificial documents**\n\nYou can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.\nThe mapping used is determined by the specified `_index`.", - "examples": { - "MultiTermVectorsRequestExample1": { - "description": "Run `POST /my-index-000001/_mtermvectors`. When you specify an index in the request URI, the index does not need to be specified for each documents in the request body.\n", - "summary": "Get multiple term vectors", - "value": "{\n \"docs\": [\n {\n \"_id\": \"2\",\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n },\n {\n \"_id\": \"1\"\n }\n ]\n}" - }, - "MultiTermVectorsRequestExample2": { - "description": "Run `POST /my-index-000001/_mtermvectors`. If all requested documents are in same index and the parameters are the same, you can use a simplified syntax.\n", - "summary": "Simplified syntax", - "value": "{\n \"ids\": [ \"1\", \"2\" ],\n \"fields\": [\n \"message\"\n ],\n \"term_statistics\": true\n}" - }, - "MultiTermVectorsRequestExample3": { - "description": "Run `POST /_mtermvectors` to generate term vectors for artificial documents provided in the body of the request. The mapping used is determined by the specified `_index`.\n", - "summary": "Artificial documents", - "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"test test test\"\n }\n },\n {\n \"_index\": \"my-index-000001\",\n \"doc\" : {\n \"message\" : \"Another test ...\"\n }\n }\n ]\n}" - } - }, + "description": "Open a point in time.\n\nA search request by default runs against the most recent visible data of the target indices,\nwhich is called point in time. Elasticsearch pit (point in time) is a lightweight view into the\nstate of the data as it existed when initiated. In some cases, it’s preferred to perform multiple\nsearch requests using the same point in time. For example, if refreshes happen between\n`search_after` requests, then the results of those requests might not be consistent as changes happening\nbetween searches are only visible to the more recent point in time.\n\nA point in time must be opened explicitly before being used in search requests.\n\nA subsequent search request with the `pit` parameter must not specify `index`, `routing`, or `preference` values as these parameters are copied from the point in time.\n\nJust like regular searches, you can use `from` and `size` to page through point in time search results, up to the first 10,000 hits.\nIf you want to retrieve more hits, use PIT with `search_after`.\n\nIMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request.\n\nWhen a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a `NoShardAvailableActionException` exception.\nTo get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime.\n\n**Keeping point in time alive**\n\nThe `keep_alive` parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time.\nThe value does not need to be long enough to process all data — it just needs to be long enough for the next request.\n\nNormally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments.\nOnce the smaller segments are no longer needed they are deleted.\nHowever, open point-in-times prevent the old segments from being deleted since they are still in use.\n\nTIP: Keeping older segments alive means that more disk space and file handles are needed.\nEnsure that you have configured your nodes to have ample free file handles.\n\nAdditionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request.\nEnsure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates.\nNote that a point-in-time doesn't prevent its associated indices from being deleted.\nYou can check how many point-in-times (that is, search contexts) are open with the nodes stats API.", "inherits": { "type": { "name": "RequestBase", @@ -32648,17 +32505,17 @@ }, "name": { "name": "Request", - "namespace": "_global.mtermvectors" + "namespace": "_global.open_point_in_time" }, "path": [ { - "description": "The name of the index that contains the documents.", + "description": "A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices", "name": "index", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { - "name": "IndexName", + "name": "Indices", "namespace": "_types" } } @@ -32666,76 +32523,22 @@ ], "query": [ { - "description": "A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body", - "name": "ids", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" - } - } - } - }, - { - "description": "A comma-separated list or wildcard expressions of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", - "name": "fields", - "required": false, + "description": "Extend the length of time that the point in time persists.", + "name": "keep_alive", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "Fields", + "name": "Duration", "namespace": "_types" } } }, { - "description": "If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies.", - "name": "field_statistics", - "required": false, - "serverDefault": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "If `true`, the response includes term offsets.", - "name": "offsets", - "required": false, - "serverDefault": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "If `true`, the response includes term payloads.", - "name": "payloads", - "required": false, - "serverDefault": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "If `true`, the response includes term positions.", - "name": "positions", + "description": "If `false`, the request returns an error if it targets a missing or closed index.", + "name": "ignore_unavailable", "required": false, - "serverDefault": true, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -32745,7 +32548,7 @@ } }, { - "description": "The node or shard the operation should be performed on.\nIt is random by default.", + "description": "The node or shard the operation should be performed on.\nBy default, it is random.", "name": "preference", "required": false, "type": { @@ -32757,22 +32560,7 @@ } }, { - "description": "If true, the request is real-time as opposed to near-real-time.", - "docId": "realtime", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html#realtime", - "name": "realtime", - "required": false, - "serverDefault": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "A custom value used to route operations to a specific shard.", + "description": "A custom value that is used to route operations to a specific shard.", "name": "routing", "required": false, "type": { @@ -32784,44 +32572,33 @@ } }, { - "description": "If true, the response includes term frequency and document frequency.", - "name": "term_statistics", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "If `true`, returns the document version as part of a hit.", - "name": "version", + "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.", + "name": "expand_wildcards", "required": false, + "serverDefault": "open", "type": { "kind": "instance_of", "type": { - "name": "VersionNumber", + "name": "ExpandWildcards", "namespace": "_types" } } }, { - "description": "The version type.", - "name": "version_type", + "description": "Indicates whether the point in time tolerates unavailable shards or shard failures when initially creating the PIT.\nIf `false`, creating a point in time request when a shard is missing or unavailable will throw an exception.\nIf `true`, the point in time will contain all the shards that are available at the time of the request.", + "name": "allow_partial_search_results", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "VersionType", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } } ], - "specLocation": "_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L134" + "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L121" }, { "kind": "response", @@ -32829,702 +32606,451 @@ "kind": "properties", "properties": [ { - "name": "docs", + "description": "Shards used to create the PIT", + "name": "_shards", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "TermVectorsResult", - "namespace": "_global.mtermvectors" - } + "kind": "instance_of", + "type": { + "name": "ShardStatistics", + "namespace": "_types" + } + } + }, + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" } } } ] }, + "examples": { + "OpenPointInTimeResponseExample1": { + "description": "A successful response from `POST /my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true`. It includes a summary of the total number of shards, as well as the number of successful shards when creating the PIT.\n", + "value": "{\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA=\",\n \"_shards\": {\n \"total\": 10,\n \"successful\": 10,\n \"skipped\": 0,\n \"failed\": 0\n }\n}" + } + }, "name": { "name": "Response", - "namespace": "_global.mtermvectors" + "namespace": "_global.open_point_in_time" }, - "specLocation": "_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24" + "specLocation": "_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29" }, { - "kind": "interface", + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Ping the cluster.\nGet information about whether the cluster is running.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, "name": { - "name": "TermVectorsResult", - "namespace": "_global.mtermvectors" + "name": "Request", + "namespace": "_global.ping" }, - "properties": [ - { - "name": "_id", - "required": false, - "type": { - "kind": "instance_of", + "path": [], + "query": [], + "specLocation": "_global/ping/PingRequest.ts#L22-L38" + }, + { + "kind": "response", + "body": { + "kind": "no_body" + }, + "name": { + "name": "Response", + "namespace": "_global.ping" + }, + "specLocation": "_global/ping/PingResponse.ts#L22-L24" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "description": "The script or search template, its parameters, and its language.", + "name": "script", + "required": true, "type": { - "name": "Id", - "namespace": "_types" + "kind": "instance_of", + "type": { + "name": "StoredScript", + "namespace": "_types" + } } } + ] + }, + "description": "Create or update a script or search template.\nCreates or updates a stored script or search template.", + "examples": { + "PutScriptRequestExample1": { + "description": "Run `PUT _scripts/my-search-template` to create a search template.\n", + "summary": "Create a search template", + "value": "{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" }, + "PutScriptRequestExample2": { + "description": "Run `PUT _scripts/my-stored-script` to create a stored script.\n", + "summary": "Create a stored script", + "value": "{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params['my_modifier']\"\n }\n}" + } + }, + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "_global.put_script" + }, + "path": [ { - "name": "_index", + "description": "The identifier for the stored script or search template.\nIt must be unique within the cluster.", + "name": "id", "required": true, "type": { "kind": "instance_of", "type": { - "name": "IndexName", + "name": "Id", "namespace": "_types" } } }, { - "name": "_version", + "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.", + "name": "context", "required": false, "type": { "kind": "instance_of", "type": { - "name": "VersionNumber", + "name": "Name", "namespace": "_types" } } - }, + } + ], + "query": [ { - "name": "took", + "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.\nIf you specify both this and the `` path parameter, the API uses the request path parameter.", + "name": "context", "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "Name", "namespace": "_types" } } }, { - "name": "found", + "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "master_timeout", "required": false, + "serverDefault": "30s", "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "name": "term_vectors", - "required": false, - "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "Field", - "namespace": "_types" - } - }, - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "TermVector", - "namespace": "_global.termvectors" - } + "name": "Duration", + "namespace": "_types" } } }, { - "name": "error", + "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", + "name": "timeout", "required": false, + "serverDefault": "30s", "type": { "kind": "instance_of", "type": { - "name": "ErrorCause", + "name": "Duration", "namespace": "_types" } } } ], - "specLocation": "_global/mtermvectors/types.ts#L96-L104" + "specLocation": "_global/put_script/PutScriptRequest.ts#L25-L87" }, { - "kind": "request", - "attachedBehaviors": [ - "CommonQueryParameters" - ], + "kind": "response", "body": { - "kind": "properties", - "properties": [ - { - "description": "Filter indices if the provided query rewrites to `match_none` on every shard.", - "name": "index_filter", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" - } - } + "kind": "value", + "codegenName": "result", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" } - ] - }, - "description": "Open a point in time.\n\nA search request by default runs against the most recent visible data of the target indices,\nwhich is called point in time. Elasticsearch pit (point in time) is a lightweight view into the\nstate of the data as it existed when initiated. In some cases, it’s preferred to perform multiple\nsearch requests using the same point in time. For example, if refreshes happen between\n`search_after` requests, then the results of those requests might not be consistent as changes happening\nbetween searches are only visible to the more recent point in time.\n\nA point in time must be opened explicitly before being used in search requests.\n\nA subsequent search request with the `pit` parameter must not specify `index`, `routing`, or `preference` values as these parameters are copied from the point in time.\n\nJust like regular searches, you can use `from` and `size` to page through point in time search results, up to the first 10,000 hits.\nIf you want to retrieve more hits, use PIT with `search_after`.\n\nIMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request.\n\nWhen a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a `NoShardAvailableActionException` exception.\nTo get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime.\n\n**Keeping point in time alive**\n\nThe `keep_alive` parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time.\nThe value does not need to be long enough to process all data — it just needs to be long enough for the next request.\n\nNormally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments.\nOnce the smaller segments are no longer needed they are deleted.\nHowever, open point-in-times prevent the old segments from being deleted since they are still in use.\n\nTIP: Keeping older segments alive means that more disk space and file handles are needed.\nEnsure that you have configured your nodes to have ample free file handles.\n\nAdditionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request.\nEnsure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates.\nNote that a point-in-time doesn't prevent its associated indices from being deleted.\nYou can check how many point-in-times (that is, search contexts) are open with the nodes stats API.", - "inherits": { - "type": { - "name": "RequestBase", - "namespace": "_types" } }, "name": { - "name": "Request", - "namespace": "_global.open_point_in_time" + "name": "Response", + "namespace": "_global.put_script" }, - "path": [ + "specLocation": "_global/put_script/PutScriptResponse.ts#L22-L25" + }, + { + "kind": "interface", + "name": { + "name": "DocumentRating", + "namespace": "_global.rank_eval" + }, + "properties": [ { - "description": "A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices", - "name": "index", + "description": "The document ID.", + "name": "_id", "required": true, "type": { "kind": "instance_of", "type": { - "name": "Indices", + "name": "Id", "namespace": "_types" } } - } - ], - "query": [ + }, { - "description": "Extend the length of time that the point in time persists.", - "name": "keep_alive", + "description": "The document’s index. For data streams, this should be the document’s backing index.", + "name": "_index", "required": true, "type": { "kind": "instance_of", "type": { - "name": "Duration", + "name": "IndexName", "namespace": "_types" } } }, { - "description": "If `false`, the request returns an error if it targets a missing or closed index.", - "name": "ignore_unavailable", - "required": false, - "serverDefault": false, + "description": "The document’s relevance with regard to this search request.", + "name": "rating", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "integer", + "namespace": "_types" } } - }, + } + ], + "specLocation": "_global/rank_eval/types.ts#L119-L126" + }, + { + "kind": "interface", + "name": { + "name": "RankEvalHit", + "namespace": "_global.rank_eval" + }, + "properties": [ { - "description": "The node or shard the operation should be performed on.\nBy default, it is random.", - "name": "preference", - "required": false, + "name": "_id", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "Id", + "namespace": "_types" } } }, { - "description": "A custom value that is used to route operations to a specific shard.", - "name": "routing", - "required": false, + "name": "_index", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "Routing", + "name": "IndexName", "namespace": "_types" } } }, { - "description": "The type of index that wildcard patterns can match.\nIf the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.\nIt supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.", - "name": "expand_wildcards", - "required": false, - "serverDefault": "open", + "name": "_score", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "ExpandWildcards", + "name": "double", "namespace": "_types" } } - }, - { - "description": "Indicates whether the point in time tolerates unavailable shards or shard failures when initially creating the PIT.\nIf `false`, creating a point in time request when a shard is missing or unavailable will throw an exception.\nIf `true`, the point in time will contain all the shards that are available at the time of the request.", - "name": "allow_partial_search_results", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } } ], - "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L121" + "specLocation": "_global/rank_eval/types.ts#L144-L148" }, { - "kind": "response", - "body": { - "kind": "properties", - "properties": [ - { - "description": "Shards used to create the PIT", - "name": "_shards", - "required": true, + "kind": "interface", + "name": { + "name": "RankEvalHitItem", + "namespace": "_global.rank_eval" + }, + "properties": [ + { + "name": "hit", + "required": true, + "type": { + "kind": "instance_of", "type": { - "kind": "instance_of", - "type": { - "name": "ShardStatistics", - "namespace": "_types" - } + "name": "RankEvalHit", + "namespace": "_global.rank_eval" } - }, - { - "name": "id", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" + } + }, + { + "name": "rating", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } } - } + ] } - ] - }, - "examples": { - "OpenPointInTimeResponseExample1": { - "description": "A successful response from `POST /my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true`. It includes a summary of the total number of shards, as well as the number of successful shards when creating the PIT.\n", - "value": "{\n \"id\": \"46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA=\",\n \"_shards\": {\n \"total\": 10,\n \"successful\": 10,\n \"skipped\": 0,\n \"failed\": 0\n }\n}" } - }, - "name": { - "name": "Response", - "namespace": "_global.open_point_in_time" - }, - "specLocation": "_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29" - }, - { - "kind": "request", - "attachedBehaviors": [ - "CommonQueryParameters" ], - "body": { - "kind": "no_body" - }, - "description": "Ping the cluster.\nGet information about whether the cluster is running.", - "inherits": { - "type": { - "name": "RequestBase", - "namespace": "_types" - } - }, - "name": { - "name": "Request", - "namespace": "_global.ping" - }, - "path": [], - "query": [], - "specLocation": "_global/ping/PingRequest.ts#L22-L38" - }, - { - "kind": "response", - "body": { - "kind": "no_body" - }, - "name": { - "name": "Response", - "namespace": "_global.ping" - }, - "specLocation": "_global/ping/PingResponse.ts#L22-L24" + "specLocation": "_global/rank_eval/types.ts#L139-L142" }, { - "kind": "request", - "attachedBehaviors": [ - "CommonQueryParameters" - ], - "body": { - "kind": "properties", - "properties": [ - { - "description": "The script or search template, its parameters, and its language.", - "name": "script", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "StoredScript", - "namespace": "_types" - } - } - } - ] - }, - "description": "Create or update a script or search template.\nCreates or updates a stored script or search template.", - "examples": { - "PutScriptRequestExample1": { - "description": "Run `PUT _scripts/my-search-template` to create a search template.\n", - "summary": "Create a search template", - "value": "{\n \"script\": {\n \"lang\": \"mustache\",\n \"source\": {\n \"query\": {\n \"match\": {\n \"message\": \"{{query_string}}\"\n }\n },\n \"from\": \"{{from}}\",\n \"size\": \"{{size}}\"\n }\n }\n}" - }, - "PutScriptRequestExample2": { - "description": "Run `PUT _scripts/my-stored-script` to create a stored script.\n", - "summary": "Create a stored script", - "value": "{\n \"script\": {\n \"lang\": \"painless\",\n \"source\": \"Math.log(_score * 2) + params['my_modifier']\"\n }\n}" - } - }, - "inherits": { - "type": { - "name": "RequestBase", - "namespace": "_types" - } - }, + "kind": "interface", "name": { - "name": "Request", - "namespace": "_global.put_script" + "name": "RankEvalMetric", + "namespace": "_global.rank_eval" }, - "path": [ + "properties": [ { - "description": "The identifier for the stored script or search template.\nIt must be unique within the cluster.", - "name": "id", - "required": true, + "name": "precision", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "Id", - "namespace": "_types" + "name": "RankEvalMetricPrecision", + "namespace": "_global.rank_eval" } } }, { - "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.", - "name": "context", + "name": "recall", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Name", - "namespace": "_types" + "name": "RankEvalMetricRecall", + "namespace": "_global.rank_eval" } } - } - ], - "query": [ + }, { - "description": "The context in which the script or search template should run.\nTo prevent errors, the API immediately compiles the script or template in this context.\nIf you specify both this and the `` path parameter, the API uses the request path parameter.", - "name": "context", + "name": "mean_reciprocal_rank", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Name", - "namespace": "_types" + "name": "RankEvalMetricMeanReciprocalRank", + "namespace": "_global.rank_eval" } } }, { - "description": "The period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", - "name": "master_timeout", + "name": "dcg", "required": false, - "serverDefault": "30s", "type": { "kind": "instance_of", "type": { - "name": "Duration", - "namespace": "_types" + "name": "RankEvalMetricDiscountedCumulativeGain", + "namespace": "_global.rank_eval" } } }, { - "description": "The period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.\nIt can also be set to `-1` to indicate that the request should never timeout.", - "name": "timeout", + "name": "expected_reciprocal_rank", "required": false, - "serverDefault": "30s", "type": { "kind": "instance_of", "type": { - "name": "Duration", - "namespace": "_types" + "name": "RankEvalMetricExpectedReciprocalRank", + "namespace": "_global.rank_eval" } } } ], - "specLocation": "_global/put_script/PutScriptRequest.ts#L25-L87" - }, - { - "kind": "response", - "body": { - "kind": "value", - "codegenName": "result", - "value": { - "kind": "instance_of", - "type": { - "name": "AcknowledgedResponseBase", - "namespace": "_types" - } - } - }, - "name": { - "name": "Response", - "namespace": "_global.put_script" - }, - "specLocation": "_global/put_script/PutScriptResponse.ts#L22-L25" + "specLocation": "_global/rank_eval/types.ts#L90-L96" }, { "kind": "interface", "name": { - "name": "DocumentRating", + "name": "RankEvalMetricBase", "namespace": "_global.rank_eval" }, "properties": [ { - "description": "The document ID.", - "name": "_id", - "required": true, + "description": "Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query.", + "name": "k", + "required": false, + "serverDefault": 10, "type": { "kind": "instance_of", "type": { - "name": "Id", + "name": "integer", "namespace": "_types" } } - }, + } + ], + "specLocation": "_global/rank_eval/types.ts#L26-L32" + }, + { + "kind": "interface", + "name": { + "name": "RankEvalMetricDetail", + "namespace": "_global.rank_eval" + }, + "properties": [ { - "description": "The document’s index. For data streams, this should be the document’s backing index.", - "name": "_index", + "description": "The metric_score in the details section shows the contribution of this query to the global quality metric score", + "name": "metric_score", "required": true, "type": { "kind": "instance_of", "type": { - "name": "IndexName", + "name": "double", "namespace": "_types" } } }, { - "description": "The document’s relevance with regard to this search request.", - "name": "rating", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - } - ], - "specLocation": "_global/rank_eval/types.ts#L119-L126" - }, - { - "kind": "interface", - "name": { - "name": "RankEvalHit", - "namespace": "_global.rank_eval" - }, - "properties": [ - { - "name": "_id", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" - } - } - }, - { - "name": "_index", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - } - }, - { - "name": "_score", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - } - } - ], - "specLocation": "_global/rank_eval/types.ts#L144-L148" - }, - { - "kind": "interface", - "name": { - "name": "RankEvalHitItem", - "namespace": "_global.rank_eval" - }, - "properties": [ - { - "name": "hit", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "RankEvalHit", - "namespace": "_global.rank_eval" - } - } - }, - { - "name": "rating", - "required": false, - "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ] - } - } - ], - "specLocation": "_global/rank_eval/types.ts#L139-L142" - }, - { - "kind": "interface", - "name": { - "name": "RankEvalMetric", - "namespace": "_global.rank_eval" - }, - "properties": [ - { - "name": "precision", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RankEvalMetricPrecision", - "namespace": "_global.rank_eval" - } - } - }, - { - "name": "recall", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RankEvalMetricRecall", - "namespace": "_global.rank_eval" - } - } - }, - { - "name": "mean_reciprocal_rank", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RankEvalMetricMeanReciprocalRank", - "namespace": "_global.rank_eval" - } - } - }, - { - "name": "dcg", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RankEvalMetricDiscountedCumulativeGain", - "namespace": "_global.rank_eval" - } - } - }, - { - "name": "expected_reciprocal_rank", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RankEvalMetricExpectedReciprocalRank", - "namespace": "_global.rank_eval" - } - } - } - ], - "specLocation": "_global/rank_eval/types.ts#L90-L96" - }, - { - "kind": "interface", - "name": { - "name": "RankEvalMetricBase", - "namespace": "_global.rank_eval" - }, - "properties": [ - { - "description": "Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query.", - "name": "k", - "required": false, - "serverDefault": 10, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - } - ], - "specLocation": "_global/rank_eval/types.ts#L26-L32" - }, - { - "kind": "interface", - "name": { - "name": "RankEvalMetricDetail", - "namespace": "_global.rank_eval" - }, - "properties": [ - { - "description": "The metric_score in the details section shows the contribution of this query to the global quality metric score", - "name": "metric_score", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - } - }, - { - "description": "The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents", - "name": "unrated_docs", + "description": "The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents", + "name": "unrated_docs", "required": true, "type": { "kind": "array_of", @@ -39873,120 +39399,625 @@ } }, { - "name": "_nested", - "required": false, + "name": "_nested", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "NestedIdentity", + "namespace": "_global.search._types" + } + } + }, + { + "name": "_ignored", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "ignored_field_values", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "array_of", + "value": { + "kind": "user_defined_value" + } + } + } + }, + { + "name": "_shard", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "_node", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "_source", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "TDocument", + "namespace": "_global.search._types.Hit" + } + } + }, + { + "name": "_rank", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "_seq_no", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SequenceNumber", + "namespace": "_types" + } + } + }, + { + "name": "_primary_term", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "_version", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "VersionNumber", + "namespace": "_types" + } + } + }, + { + "name": "sort", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SortResults", + "namespace": "_types" + } + } + } + ], + "specLocation": "_global/search/_types/hits.ts#L40-L65" + }, + { + "kind": "interface", + "generics": [ + { + "name": "T", + "namespace": "_global.search._types.HitsMetadata" + } + ], + "name": { + "name": "HitsMetadata", + "namespace": "_global.search._types" + }, + "properties": [ + { + "description": "Total hit count information, present only if `track_total_hits` wasn't `false` in the search request.", + "name": "total", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "TotalHits", + "namespace": "_global.search._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + ] + } + }, + { + "name": "hits", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "T", + "namespace": "_global.search._types.HitsMetadata" + } + } + ], + "type": { + "name": "Hit", + "namespace": "_global.search._types" + } + } + } + }, + { + "name": "max_score", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ] + } + } + ], + "specLocation": "_global/search/_types/hits.ts#L67-L73" + }, + { + "kind": "interface", + "name": { + "name": "InnerHits", + "namespace": "_global.search._types" + }, + "properties": [ + { + "description": "The name for the particular inner hit definition in the response.\nUseful when a search request contains multiple inner hits.", + "name": "name", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + } + }, + { + "description": "The maximum number of hits to return per `inner_hits`.", + "name": "size", + "required": false, + "serverDefault": 3, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Inner hit starting document offset.", + "name": "from", + "required": false, + "serverDefault": 0, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "collapse", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FieldCollapse", + "namespace": "_global.search._types" + } + } + }, + { + "name": "docvalue_fields", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FieldAndFormat", + "namespace": "_types.query_dsl" + } + } + } + }, + { + "name": "explain", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "highlight", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Highlight", + "namespace": "_global.search._types" + } + } + }, + { + "name": "ignore_unmapped", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "script_fields", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "ScriptField", + "namespace": "_types" + } + } + } + }, + { + "name": "seq_no_primary_term", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "fields", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Fields", + "namespace": "_types" + } + } + }, + { + "description": "How the inner hits should be sorted per `inner_hits`.\nBy default, inner hits are sorted by score.", + "name": "sort", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Sort", + "namespace": "_types" + } + } + }, + { + "name": "_source", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SourceConfig", + "namespace": "_global.search._types" + } + } + }, + { + "name": "stored_fields", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Fields", + "namespace": "_types" + } + } + }, + { + "name": "track_scores", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "version", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "_global/search/_types/hits.ts#L107-L141" + }, + { + "kind": "interface", + "name": { + "name": "InnerHitsResult", + "namespace": "_global.search._types" + }, + "properties": [ + { + "name": "hits", + "required": true, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "user_defined_value" + } + ], + "type": { + "name": "HitsMetadata", + "namespace": "_global.search._types" + } + } + } + ], + "specLocation": "_global/search/_types/hits.ts#L85-L87" + }, + { + "kind": "interface", + "name": { + "name": "KnnCollectorResult", + "namespace": "_global.search._types" + }, + "properties": [ + { + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "reason", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "NestedIdentity", - "namespace": "_global.search._types" + "name": "string", + "namespace": "_builtins" } } }, { - "name": "_ignored", + "name": "time", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "name": "time_in_nanos", + "required": true, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitNanos", + "namespace": "_types" + } } + ], + "type": { + "name": "DurationValue", + "namespace": "_types" } } }, { - "name": "ignored_field_values", + "name": "children", "required": false, "type": { - "kind": "dictionary_of", - "key": { + "kind": "array_of", + "value": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, - "value": { - "kind": "array_of", - "value": { - "kind": "user_defined_value" + "name": "KnnCollectorResult", + "namespace": "_global.search._types" } } } - }, + } + ], + "specLocation": "_global/search/_types/profile.ts#L222-L228" + }, + { + "kind": "interface", + "name": { + "name": "KnnQueryProfileBreakdown", + "namespace": "_global.search._types" + }, + "properties": [ { - "name": "_shard", - "required": false, + "name": "advance", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } }, { - "name": "_node", - "required": false, + "name": "advance_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } }, { - "name": "_routing", - "required": false, + "name": "build_scorer", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } }, { - "name": "_source", - "required": false, + "name": "build_scorer_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "TDocument", - "namespace": "_global.search._types.Hit" + "name": "long", + "namespace": "_types" } } }, { - "name": "_rank", - "required": false, + "name": "compute_max_score", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } }, { - "name": "_seq_no", - "required": false, + "name": "compute_max_score_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "SequenceNumber", + "name": "long", "namespace": "_types" } } }, { - "name": "_primary_term", - "required": false, + "name": "count_weight", + "required": true, "type": { "kind": "instance_of", "type": { @@ -39996,358 +40027,289 @@ } }, { - "name": "_version", - "required": false, + "name": "count_weight_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "VersionNumber", + "name": "long", "namespace": "_types" } } }, { - "name": "sort", - "required": false, + "name": "create_weight", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "SortResults", + "name": "long", "namespace": "_types" } } - } - ], - "specLocation": "_global/search/_types/hits.ts#L40-L65" - }, - { - "kind": "interface", - "generics": [ - { - "name": "T", - "namespace": "_global.search._types.HitsMetadata" - } - ], - "name": { - "name": "HitsMetadata", - "namespace": "_global.search._types" - }, - "properties": [ - { - "description": "Total hit count information, present only if `track_total_hits` wasn't `false` in the search request.", - "name": "total", - "required": false, - "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "TotalHits", - "namespace": "_global.search._types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - ] - } }, { - "name": "hits", + "name": "create_weight_count", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "T", - "namespace": "_global.search._types.HitsMetadata" - } - } - ], - "type": { - "name": "Hit", - "namespace": "_global.search._types" - } + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" } } }, { - "name": "max_score", - "required": false, + "name": "match", + "required": true, "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ] + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } } - } - ], - "specLocation": "_global/search/_types/hits.ts#L67-L73" - }, - { - "kind": "interface", - "name": { - "name": "InnerHits", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "description": "The name for the particular inner hit definition in the response.\nUseful when a search request contains multiple inner hits.", - "name": "name", - "required": false, + "name": "match_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "Name", + "name": "long", "namespace": "_types" } } }, { - "description": "The maximum number of hits to return per `inner_hits`.", - "name": "size", - "required": false, - "serverDefault": 3, + "name": "next_doc", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } }, { - "description": "Inner hit starting document offset.", - "name": "from", - "required": false, - "serverDefault": 0, + "name": "next_doc_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } }, { - "name": "collapse", - "required": false, + "name": "score", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "FieldCollapse", - "namespace": "_global.search._types" + "name": "long", + "namespace": "_types" } } }, { - "name": "docvalue_fields", - "required": false, + "name": "score_count", + "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "FieldAndFormat", - "namespace": "_types.query_dsl" - } + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" } } }, { - "name": "explain", - "required": false, + "name": "set_min_competitive_score", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } }, { - "name": "highlight", - "required": false, + "name": "set_min_competitive_score_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "Highlight", - "namespace": "_global.search._types" + "name": "long", + "namespace": "_types" } } }, { - "name": "ignore_unmapped", - "required": false, + "name": "shallow_advance", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } }, { - "name": "script_fields", - "required": false, + "name": "shallow_advance_count", + "required": true, "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "Field", - "namespace": "_types" - } - }, - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "ScriptField", - "namespace": "_types" - } + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" } } - }, + } + ], + "specLocation": "_global/search/_types/profile.ts#L199-L220" + }, + { + "kind": "interface", + "name": { + "name": "KnnQueryProfileResult", + "namespace": "_global.search._types" + }, + "properties": [ { - "name": "seq_no_primary_term", - "required": false, + "name": "type", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "boolean", + "name": "string", "namespace": "_builtins" } } }, { - "name": "fields", - "required": false, + "name": "description", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "Fields", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } } }, { - "description": "How the inner hits should be sorted per `inner_hits`.\nBy default, inner hits are sorted by score.", - "name": "sort", + "name": "time", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Sort", + "name": "Duration", "namespace": "_types" } } }, { - "name": "_source", - "required": false, + "name": "time_in_nanos", + "required": true, "type": { "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitNanos", + "namespace": "_types" + } + } + ], "type": { - "name": "SourceConfig", - "namespace": "_global.search._types" + "name": "DurationValue", + "namespace": "_types" } } }, { - "name": "stored_fields", - "required": false, + "name": "breakdown", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "Fields", - "namespace": "_types" + "name": "KnnQueryProfileBreakdown", + "namespace": "_global.search._types" } } }, { - "name": "track_scores", + "name": "debug", "required": false, - "serverDefault": false, "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "user_defined_value" } } }, { - "name": "version", + "name": "children", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "KnnQueryProfileResult", + "namespace": "_global.search._types" + } } } } ], - "specLocation": "_global/search/_types/hits.ts#L107-L141" + "specLocation": "_global/search/_types/profile.ts#L188-L196" }, { "kind": "interface", "name": { - "name": "InnerHitsResult", + "name": "LaplaceSmoothingModel", "namespace": "_global.search._types" }, "properties": [ { - "name": "hits", + "description": "A constant that is added to all counts to balance weights.", + "name": "alpha", "required": true, "type": { "kind": "instance_of", - "generics": [ - { - "kind": "user_defined_value" - } - ], "type": { - "name": "HitsMetadata", - "namespace": "_global.search._types" + "name": "double", + "namespace": "_types" } } } ], - "specLocation": "_global/search/_types/hits.ts#L85-L87" + "specLocation": "_global/search/_types/suggester.ts#L430-L435" }, { "kind": "interface", "name": { - "name": "KnnCollectorResult", + "name": "LearningToRank", "namespace": "_global.search._types" }, "properties": [ { - "name": "name", + "description": "The unique identifier of the trained model uploaded to Elasticsearch", + "name": "model_id", "required": true, "type": { "kind": "instance_of", @@ -40358,1020 +40320,1097 @@ } }, { - "name": "reason", - "required": true, + "description": "Named parameters to be passed to the query templates used for feature", + "name": "params", + "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "user_defined_value" } } - }, + } + ], + "specLocation": "_global/search/_types/rescoring.ts#L88-L97" + }, + { + "kind": "interface", + "name": { + "name": "LinearInterpolationSmoothingModel", + "namespace": "_global.search._types" + }, + "properties": [ { - "name": "time", - "required": false, + "name": "bigram_lambda", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "Duration", + "name": "double", "namespace": "_types" } } }, { - "name": "time_in_nanos", + "name": "trigram_lambda", "required": true, "type": { "kind": "instance_of", - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "UnitNanos", - "namespace": "_types" - } - } - ], "type": { - "name": "DurationValue", + "name": "double", "namespace": "_types" } } }, { - "name": "children", - "required": false, + "name": "unigram_lambda", + "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "KnnCollectorResult", - "namespace": "_global.search._types" - } + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" } } } ], - "specLocation": "_global/search/_types/profile.ts#L222-L228" + "specLocation": "_global/search/_types/suggester.ts#L437-L441" }, { "kind": "interface", "name": { - "name": "KnnQueryProfileBreakdown", + "name": "NestedIdentity", "namespace": "_global.search._types" }, "properties": [ { - "name": "advance", + "name": "field", "required": true, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "Field", "namespace": "_types" } } }, { - "name": "advance_count", + "name": "offset", "required": true, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } }, { - "name": "build_scorer", - "required": true, + "name": "_nested", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "NestedIdentity", + "namespace": "_global.search._types" } } - }, + } + ], + "specLocation": "_global/search/_types/hits.ts#L89-L93" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "SuggestBase", + "namespace": "_global.search._types" + } + }, + "name": { + "name": "PhraseSuggest", + "namespace": "_global.search._types" + }, + "properties": [ { - "name": "build_scorer_count", + "name": "options", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "PhraseSuggestOption", + "namespace": "_global.search._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "PhraseSuggestOption", + "namespace": "_global.search._types" + } + } + } + ] + } + } + ], + "specLocation": "_global/search/_types/suggester.ts#L57-L62", + "variantName": "phrase" + }, + { + "kind": "interface", + "name": { + "name": "PhraseSuggestCollate", + "namespace": "_global.search._types" + }, + "properties": [ + { + "description": "Parameters to use if the query is templated.", + "name": "params", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "user_defined_value" } } }, { - "name": "compute_max_score", - "required": true, + "description": "Returns all suggestions with an extra `collate_match` option indicating whether the generated phrase matched any document.", + "name": "prune", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "name": "compute_max_score_count", + "description": "A collate query that is run once for every suggestion.", + "name": "query", "required": true, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "PhraseSuggestCollateQuery", + "namespace": "_global.search._types" } } - }, + } + ], + "specLocation": "_global/search/_types/suggester.ts#L333-L346" + }, + { + "kind": "interface", + "name": { + "name": "PhraseSuggestCollateQuery", + "namespace": "_global.search._types" + }, + "properties": [ { - "name": "count_weight", - "required": true, + "description": "The search template ID.", + "name": "id", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "Id", "namespace": "_types" } } }, { - "name": "count_weight_count", - "required": true, + "description": "The query source.", + "name": "source", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } } - }, + } + ], + "specLocation": "_global/search/_types/suggester.ts#L348-L357" + }, + { + "kind": "interface", + "name": { + "name": "PhraseSuggestHighlight", + "namespace": "_global.search._types" + }, + "properties": [ { - "name": "create_weight", + "description": "Use in conjunction with `pre_tag` to define the HTML tags to use for the highlighted text.", + "name": "post_tag", "required": true, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } } }, { - "name": "create_weight_count", + "description": "Use in conjunction with `post_tag` to define the HTML tags to use for the highlighted text.", + "name": "pre_tag", "required": true, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } } - }, + } + ], + "specLocation": "_global/search/_types/suggester.ts#L419-L428" + }, + { + "kind": "interface", + "name": { + "name": "PhraseSuggestOption", + "namespace": "_global.search._types" + }, + "properties": [ { - "name": "match", + "name": "text", "required": true, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } } }, { - "name": "match_count", + "name": "score", "required": true, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "double", "namespace": "_types" } } }, { - "name": "next_doc", - "required": true, + "name": "highlighted", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } } }, { - "name": "next_doc_count", - "required": true, + "name": "collate_match", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } - }, + } + ], + "specLocation": "_global/search/_types/suggester.ts#L86-L91" + }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "SuggesterBase", + "namespace": "_global.search._types" + } + }, + "name": { + "name": "PhraseSuggester", + "namespace": "_global.search._types" + }, + "properties": [ { - "name": "score", - "required": true, + "description": "Checks each suggestion against the specified query to prune suggestions for which no matching docs exist in the index.", + "name": "collate", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "PhraseSuggestCollate", + "namespace": "_global.search._types" } } }, { - "name": "score_count", - "required": true, + "description": "Defines a factor applied to the input phrases score, which is used as a threshold for other suggest candidates.\nOnly candidates that score higher than the threshold will be included in the result.", + "name": "confidence", + "required": false, + "serverDefault": 1, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "double", "namespace": "_types" } } }, { - "name": "set_min_competitive_score", - "required": true, + "description": "A list of candidate generators that produce a list of possible terms per term in the given text.", + "name": "direct_generator", + "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "DirectGenerator", + "namespace": "_global.search._types" + } } } }, { - "name": "set_min_competitive_score_count", - "required": true, + "name": "force_unigrams", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "name": "shallow_advance", - "required": true, + "description": "Sets max size of the n-grams (shingles) in the field.\nIf the field doesn’t contain n-grams (shingles), this should be omitted or set to `1`.\nIf the field uses a shingle filter, the `gram_size` is set to the `max_shingle_size` if not explicitly set.", + "name": "gram_size", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } }, { - "name": "shallow_advance_count", - "required": true, + "description": "Sets up suggestion highlighting.\nIf not provided, no highlighted field is returned.", + "name": "highlight", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "PhraseSuggestHighlight", + "namespace": "_global.search._types" } } - } - ], - "specLocation": "_global/search/_types/profile.ts#L199-L220" - }, - { - "kind": "interface", - "name": { - "name": "KnnQueryProfileResult", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "name": "type", - "required": true, + "description": "The maximum percentage of the terms considered to be misspellings in order to form a correction.\nThis method accepts a float value in the range `[0..1)` as a fraction of the actual query terms or a number `>=1` as an absolute number of query terms.", + "name": "max_errors", + "required": false, + "serverDefault": 1, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "double", + "namespace": "_types" } } }, { - "name": "description", - "required": true, + "description": "The likelihood of a term being misspelled even if the term exists in the dictionary.", + "name": "real_word_error_likelihood", + "required": false, + "serverDefault": 0.95, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "double", + "namespace": "_types" } } }, { - "name": "time", + "description": "The separator that is used to separate terms in the bigram field.\nIf not set, the whitespace character is used as a separator.", + "name": "separator", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Duration", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } } }, { - "name": "time_in_nanos", - "required": true, + "description": "Sets the maximum number of suggested terms to be retrieved from each individual shard.", + "name": "shard_size", + "required": false, + "serverDefault": 5, "type": { "kind": "instance_of", - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "UnitNanos", - "namespace": "_types" - } - } - ], "type": { - "name": "DurationValue", + "name": "integer", "namespace": "_types" } } }, { - "name": "breakdown", - "required": true, + "description": "The smoothing model used to balance weight between infrequent grams (grams (shingles) are not existing in the index) and frequent grams (appear at least once in the index).\nThe default model is Stupid Backoff.", + "name": "smoothing", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "KnnQueryProfileBreakdown", + "name": "SmoothingModelContainer", "namespace": "_global.search._types" } } }, { - "name": "debug", + "description": "The text/query to provide suggestions for.", + "name": "text", "required": false, "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, - "value": { - "kind": "user_defined_value" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" } } }, { - "name": "children", + "name": "token_limit", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "KnnQueryProfileResult", - "namespace": "_global.search._types" - } + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" } } } ], - "specLocation": "_global/search/_types/profile.ts#L188-L196" + "specLocation": "_global/search/_types/suggester.ts#L359-L417" }, { "kind": "interface", "name": { - "name": "LaplaceSmoothingModel", + "name": "PointInTimeReference", "namespace": "_global.search._types" }, "properties": [ { - "description": "A constant that is added to all counts to balance weights.", - "name": "alpha", + "name": "id", "required": true, "type": { "kind": "instance_of", "type": { - "name": "double", + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "keep_alive", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", "namespace": "_types" } } } ], - "specLocation": "_global/search/_types/suggester.ts#L430-L435" + "specLocation": "_global/search/_types/PointInTimeReference.ts#L23-L26" }, { "kind": "interface", "name": { - "name": "LearningToRank", + "name": "Profile", "namespace": "_global.search._types" }, "properties": [ { - "description": "The unique identifier of the trained model uploaded to Elasticsearch", - "name": "model_id", + "name": "shards", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "description": "Named parameters to be passed to the query templates used for feature", - "name": "params", - "required": false, - "type": { - "kind": "dictionary_of", - "key": { + "kind": "array_of", + "value": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ShardProfile", + "namespace": "_global.search._types" } - }, - "singleKey": false, - "value": { - "kind": "user_defined_value" } } } ], - "specLocation": "_global/search/_types/rescoring.ts#L88-L97" + "specLocation": "_global/search/_types/profile.ts#L101-L103" }, { "kind": "interface", "name": { - "name": "LinearInterpolationSmoothingModel", + "name": "QueryBreakdown", "namespace": "_global.search._types" }, "properties": [ { - "name": "bigram_lambda", + "name": "advance", "required": true, "type": { "kind": "instance_of", "type": { - "name": "double", + "name": "long", "namespace": "_types" } } }, { - "name": "trigram_lambda", + "name": "advance_count", "required": true, "type": { "kind": "instance_of", "type": { - "name": "double", + "name": "long", "namespace": "_types" } } }, { - "name": "unigram_lambda", + "name": "build_scorer", "required": true, "type": { "kind": "instance_of", "type": { - "name": "double", + "name": "long", "namespace": "_types" } } - } - ], - "specLocation": "_global/search/_types/suggester.ts#L437-L441" - }, - { - "kind": "interface", - "name": { - "name": "NestedIdentity", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "name": "field", + "name": "build_scorer_count", "required": true, "type": { "kind": "instance_of", "type": { - "name": "Field", + "name": "long", "namespace": "_types" } } }, { - "name": "offset", + "name": "create_weight", "required": true, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } }, { - "name": "_nested", - "required": false, + "name": "create_weight_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "NestedIdentity", - "namespace": "_global.search._types" + "name": "long", + "namespace": "_types" } } - } - ], - "specLocation": "_global/search/_types/hits.ts#L89-L93" - }, - { - "kind": "interface", - "inherits": { - "type": { - "name": "SuggestBase", - "namespace": "_global.search._types" - } - }, - "name": { - "name": "PhraseSuggest", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "name": "options", + "name": "match", "required": true, "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "PhraseSuggestOption", - "namespace": "_global.search._types" - } - }, - { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "PhraseSuggestOption", - "namespace": "_global.search._types" - } - } - } - ] + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "match_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } } - } - ], - "specLocation": "_global/search/_types/suggester.ts#L57-L62", - "variantName": "phrase" - }, - { - "kind": "interface", - "name": { - "name": "PhraseSuggestCollate", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "description": "Parameters to use if the query is templated.", - "name": "params", - "required": false, + "name": "shallow_advance", + "required": true, "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, - "value": { - "kind": "user_defined_value" + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" } } }, { - "description": "Returns all suggestions with an extra `collate_match` option indicating whether the generated phrase matched any document.", - "name": "prune", - "required": false, + "name": "shallow_advance_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } }, { - "description": "A collate query that is run once for every suggestion.", - "name": "query", + "name": "next_doc", "required": true, "type": { "kind": "instance_of", "type": { - "name": "PhraseSuggestCollateQuery", - "namespace": "_global.search._types" + "name": "long", + "namespace": "_types" } } - } - ], - "specLocation": "_global/search/_types/suggester.ts#L333-L346" - }, - { - "kind": "interface", - "name": { - "name": "PhraseSuggestCollateQuery", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "description": "The search template ID.", - "name": "id", - "required": false, + "name": "next_doc_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "Id", + "name": "long", "namespace": "_types" } } }, { - "description": "The query source.", - "name": "source", - "required": false, + "name": "score", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } - } - ], - "specLocation": "_global/search/_types/suggester.ts#L348-L357" - }, - { - "kind": "interface", - "name": { - "name": "PhraseSuggestHighlight", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "description": "Use in conjunction with `pre_tag` to define the HTML tags to use for the highlighted text.", - "name": "post_tag", + "name": "score_count", "required": true, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } }, { - "description": "Use in conjunction with `post_tag` to define the HTML tags to use for the highlighted text.", - "name": "pre_tag", + "name": "compute_max_score", "required": true, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } - } - ], - "specLocation": "_global/search/_types/suggester.ts#L419-L428" - }, - { - "kind": "interface", - "name": { - "name": "PhraseSuggestOption", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "name": "text", + "name": "compute_max_score_count", "required": true, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } }, { - "name": "score", + "name": "count_weight", "required": true, "type": { "kind": "instance_of", "type": { - "name": "double", + "name": "long", "namespace": "_types" } } }, { - "name": "highlighted", - "required": false, + "name": "count_weight_count", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } } }, { - "name": "collate_match", - "required": false, + "name": "set_min_competitive_score", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "set_min_competitive_score_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" } } } ], - "specLocation": "_global/search/_types/suggester.ts#L86-L91" + "specLocation": "_global/search/_types/profile.ts#L105-L126" }, { "kind": "interface", - "inherits": { - "type": { - "name": "SuggesterBase", - "namespace": "_global.search._types" - } - }, "name": { - "name": "PhraseSuggester", + "name": "QueryProfile", "namespace": "_global.search._types" }, "properties": [ { - "description": "Checks each suggestion against the specified query to prune suggestions for which no matching docs exist in the index.", - "name": "collate", - "required": false, + "name": "breakdown", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "PhraseSuggestCollate", + "name": "QueryBreakdown", "namespace": "_global.search._types" } } }, { - "description": "Defines a factor applied to the input phrases score, which is used as a threshold for other suggest candidates.\nOnly candidates that score higher than the threshold will be included in the result.", - "name": "confidence", - "required": false, - "serverDefault": 1, + "name": "description", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "double", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } } }, { - "description": "A list of candidate generators that produce a list of possible terms per term in the given text.", - "name": "direct_generator", - "required": false, + "name": "time_in_nanos", + "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "DirectGenerator", - "namespace": "_global.search._types" + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitNanos", + "namespace": "_types" + } } + ], + "type": { + "name": "DurationValue", + "namespace": "_types" } } }, { - "name": "force_unigrams", - "required": false, + "name": "type", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "boolean", + "name": "string", "namespace": "_builtins" } } }, { - "description": "Sets max size of the n-grams (shingles) in the field.\nIf the field doesn’t contain n-grams (shingles), this should be omitted or set to `1`.\nIf the field uses a shingle filter, the `gram_size` is set to the `max_shingle_size` if not explicitly set.", - "name": "gram_size", + "name": "children", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "QueryProfile", + "namespace": "_global.search._types" + } } } + } + ], + "specLocation": "_global/search/_types/profile.ts#L128-L134" + }, + { + "kind": "interface", + "name": { + "name": "RegexOptions", + "namespace": "_global.search._types" + }, + "properties": [ + { + "description": "Optional operators for the regular expression.", + "docId": "regexp-syntax", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/regexp-syntax.html", + "name": "flags", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + ] + } }, { - "description": "Sets up suggestion highlighting.\nIf not provided, no highlighted field is returned.", - "name": "highlight", + "description": "Maximum number of automaton states required for the query.", + "name": "max_determinized_states", "required": false, + "serverDefault": 10000, "type": { "kind": "instance_of", "type": { - "name": "PhraseSuggestHighlight", - "namespace": "_global.search._types" + "name": "integer", + "namespace": "_types" } } - }, + } + ], + "specLocation": "_global/search/_types/suggester.ts#L183-L194" + }, + { + "kind": "interface", + "name": { + "name": "Rescore", + "namespace": "_global.search._types" + }, + "properties": [ { - "description": "The maximum percentage of the terms considered to be misspellings in order to form a correction.\nThis method accepts a float value in the range `[0..1)` as a fraction of the actual query terms or a number `>=1` as an absolute number of query terms.", - "name": "max_errors", + "containerProperty": true, + "name": "window_size", "required": false, - "serverDefault": 1, "type": { "kind": "instance_of", "type": { - "name": "double", + "name": "integer", "namespace": "_types" } } }, { - "description": "The likelihood of a term being misspelled even if the term exists in the dictionary.", - "name": "real_word_error_likelihood", + "name": "query", "required": false, - "serverDefault": 0.95, "type": { "kind": "instance_of", "type": { - "name": "double", - "namespace": "_types" + "name": "RescoreQuery", + "namespace": "_global.search._types" } } }, { - "description": "The separator that is used to separate terms in the bigram field.\nIf not set, the whitespace character is used as a separator.", - "name": "separator", + "name": "learning_to_rank", "required": false, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "LearningToRank", + "namespace": "_global.search._types" } } - }, + } + ], + "specLocation": "_global/search/_types/rescoring.ts#L25-L38", + "variants": { + "kind": "container", + "nonExhaustive": true + } + }, + { + "kind": "interface", + "name": { + "name": "RescoreQuery", + "namespace": "_global.search._types" + }, + "properties": [ { - "description": "Sets the maximum number of suggested terms to be retrieved from each individual shard.", - "name": "shard_size", - "required": false, - "serverDefault": 5, + "codegenName": "Query", + "description": "The query to use for rescoring.\nThis query is only run on the Top-K results returned by the `query` and `post_filter` phases.", + "name": "rescore_query", + "required": true, "type": { "kind": "instance_of", "type": { - "name": "integer", - "namespace": "_types" + "name": "QueryContainer", + "namespace": "_types.query_dsl" } } }, { - "description": "The smoothing model used to balance weight between infrequent grams (grams (shingles) are not existing in the index) and frequent grams (appear at least once in the index).\nThe default model is Stupid Backoff.", - "name": "smoothing", + "description": "Relative importance of the original query versus the rescore query.", + "name": "query_weight", "required": false, + "serverDefault": 1, "type": { "kind": "instance_of", "type": { - "name": "SmoothingModelContainer", - "namespace": "_global.search._types" + "name": "double", + "namespace": "_types" } } }, { - "description": "The text/query to provide suggestions for.", - "name": "text", + "description": "Relative importance of the rescore query versus the original query.", + "name": "rescore_query_weight", "required": false, + "serverDefault": 1, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "double", + "namespace": "_types" } } }, { - "name": "token_limit", + "description": "Determines how scores are combined.", + "name": "score_mode", "required": false, + "serverDefault": "total", "type": { "kind": "instance_of", "type": { - "name": "integer", - "namespace": "_types" + "name": "ScoreMode", + "namespace": "_global.search._types" } } } ], - "specLocation": "_global/search/_types/suggester.ts#L359-L417" + "specLocation": "_global/search/_types/rescoring.ts#L40-L62" }, { - "kind": "interface", - "name": { - "name": "PointInTimeReference", - "namespace": "_global.search._types" - }, - "properties": [ + "kind": "enum", + "members": [ { - "name": "id", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" - } - } + "description": "Average the original score and the rescore query score.", + "name": "avg" }, { - "name": "keep_alive", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - } + "description": "Take the max of original score and the rescore query score.", + "name": "max" + }, + { + "description": "Take the min of the original score and the rescore query score.", + "name": "min" + }, + { + "description": "Multiply the original score by the rescore query score.\nUseful for `function` query rescores.", + "name": "multiply" + }, + { + "description": "Add the original score and the rescore query score.", + "name": "total" } ], - "specLocation": "_global/search/_types/PointInTimeReference.ts#L23-L26" + "name": { + "name": "ScoreMode", + "namespace": "_global.search._types" + }, + "specLocation": "_global/search/_types/rescoring.ts#L64-L86" }, { "kind": "interface", "name": { - "name": "Profile", + "name": "SearchProfile", "namespace": "_global.search._types" }, "properties": [ { - "name": "shards", + "name": "collector", "required": true, "type": { "kind": "array_of", "value": { "kind": "instance_of", "type": { - "name": "ShardProfile", + "name": "Collector", "namespace": "_global.search._types" } } } - } - ], - "specLocation": "_global/search/_types/profile.ts#L101-L103" - }, - { - "kind": "interface", - "name": { - "name": "QueryBreakdown", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "name": "advance", + "name": "query", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "QueryProfile", + "namespace": "_global.search._types" + } } } }, { - "name": "advance_count", + "name": "rewrite_time", "required": true, "type": { "kind": "instance_of", @@ -41380,522 +41419,558 @@ "namespace": "_types" } } - }, + } + ], + "specLocation": "_global/search/_types/profile.ts#L136-L140" + }, + { + "kind": "interface", + "name": { + "name": "SearchRequestBody", + "namespace": "_global.search._types" + }, + "properties": [ { - "name": "build_scorer", - "required": true, + "aliases": [ + "aggs" + ], + "description": "Defines the aggregations that are run as part of the search request.", + "name": "aggregations", + "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "AggregationContainer", + "namespace": "_types.aggregations" + } } } }, { - "name": "build_scorer_count", - "required": true, + "description": "Collapses search results the values of the specified field.", + "name": "collapse", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "FieldCollapse", + "namespace": "_global.search._types" } } }, { - "name": "create_weight", - "required": true, + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "name": "explain", + "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "name": "create_weight_count", - "required": true, + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "name": "ext", + "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "user_defined_value" } } }, { - "name": "match", - "required": true, + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "name": "from", + "required": false, + "serverDefault": 0, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } }, { - "name": "match_count", - "required": true, + "description": "Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.", + "name": "highlight", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "Highlight", + "namespace": "_global.search._types" } } }, { - "name": "shallow_advance", - "required": true, + "description": "Number of hits matching the query to count accurately.\nIf `true`, the exact number of hits is returned at the cost of some performance.\nIf `false`, the response does not include the total number of hits matching the query.", + "name": "track_total_hits", + "required": false, + "serverDefault": "10000", "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "TrackHits", + "namespace": "_global.search._types" } } }, { - "name": "shallow_advance_count", - "required": true, + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "extDocId": "relevance-scores", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html#relevance-scores", + "name": "indices_boost", + "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" + "kind": "array_of", + "value": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + "singleKey": true, + "value": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } } } }, { - "name": "next_doc", - "required": true, + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", + "extDocId": "docvalue-fields", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#docvalue-fields", + "name": "docvalue_fields", + "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FieldAndFormat", + "namespace": "_types.query_dsl" + } } } }, { - "name": "next_doc_count", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" + "availability": { + "serverless": {}, + "stack": { + "since": "8.4.0" } + }, + "description": "The approximate kNN search to run.", + "extDocId": "knn-approximate", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#approximate-knn", + "name": "knn", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "KnnSearch", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "KnnSearch", + "namespace": "_types" + } + } + } + ] } }, { - "name": "score", - "required": true, + "availability": { + "stack": { + "since": "8.8.0" + } + }, + "description": "The Reciprocal Rank Fusion (RRF) to use.", + "name": "rank", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "RankContainer", "namespace": "_types" } } }, { - "name": "score_count", - "required": true, + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in the search results.", + "name": "min_score", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "double", "namespace": "_types" } } }, { - "name": "compute_max_score", - "required": true, + "description": "Use the `post_filter` parameter to filter search results.\nThe search hits are filtered after the aggregations are calculated.\nA post filter has no impact on the aggregation results.", + "name": "post_filter", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "QueryContainer", + "namespace": "_types.query_dsl" } } }, { - "name": "compute_max_score_count", - "required": true, + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "name": "profile", + "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "name": "count_weight", - "required": true, + "description": "The search definition using the Query DSL.", + "extDocId": "query-dsl", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html", + "name": "query", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", - "namespace": "_types" + "name": "QueryContainer", + "namespace": "_types.query_dsl" } } }, { - "name": "count_weight_count", - "required": true, + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", + "name": "rescore", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "Rescore", + "namespace": "_global.search._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Rescore", + "namespace": "_global.search._types" + } + } + } + ] + } + }, + { + "availability": { + "serverless": { + "stability": "stable" + }, + "stack": { + "since": "8.14.0", + "stability": "stable" + } + }, + "description": "A retriever is a specification to describe top documents returned from a search.\nA retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.", + "name": "retriever", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "RetrieverContainer", "namespace": "_types" } } }, { - "name": "set_min_competitive_score", - "required": true, + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "name": "script_fields", + "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "ScriptField", + "namespace": "_types" + } } } }, { - "name": "set_min_competitive_score_count", - "required": true, + "description": "Used to retrieve the next page of hits using a set of sort values from the previous page.", + "name": "search_after", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "SortResults", "namespace": "_types" } } - } - ], - "specLocation": "_global/search/_types/profile.ts#L105-L126" - }, - { - "kind": "interface", - "name": { - "name": "QueryProfile", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "name": "breakdown", - "required": true, + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "name": "size", + "required": false, + "serverDefault": 10, "type": { "kind": "instance_of", "type": { - "name": "QueryBreakdown", - "namespace": "_global.search._types" + "name": "integer", + "namespace": "_types" } } }, { - "name": "description", - "required": true, + "description": "Split a scrolled search into multiple slices that can be consumed independently.", + "name": "slice", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "SlicedScroll", + "namespace": "_types" } } }, { - "name": "time_in_nanos", - "required": true, + "description": "A comma-separated list of : pairs.", + "extDocId": "sort-search-results", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html", + "name": "sort", + "required": false, "type": { "kind": "instance_of", - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "UnitNanos", - "namespace": "_types" - } - } - ], "type": { - "name": "DurationValue", + "name": "Sort", "namespace": "_types" } } }, { - "name": "type", - "required": true, + "description": "The source fields that are returned for matching documents.\nThese fields are returned in the `hits._source` property of the search response.\nIf the `stored_fields` property is specified, the `_source` property defaults to `false`.\nOtherwise, it defaults to `true`.", + "extDocId": "source-filtering", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering", + "name": "_source", + "required": false, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "SourceConfig", + "namespace": "_global.search._types" } } }, { - "name": "children", + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", + "name": "fields", "required": false, "type": { "kind": "array_of", "value": { "kind": "instance_of", "type": { - "name": "QueryProfile", - "namespace": "_global.search._types" + "name": "FieldAndFormat", + "namespace": "_types.query_dsl" } } } - } - ], - "specLocation": "_global/search/_types/profile.ts#L128-L134" - }, - { - "kind": "interface", - "name": { - "name": "RegexOptions", - "namespace": "_global.search._types" - }, - "properties": [ - { - "description": "Optional operators for the regular expression.", - "docId": "regexp-syntax", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/regexp-syntax.html", - "name": "flags", - "required": false, - "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - ] - } }, { - "description": "Maximum number of automaton states required for the query.", - "name": "max_determinized_states", + "description": "Defines a suggester that provides similar looking terms based on a provided text.", + "name": "suggest", "required": false, - "serverDefault": 10000, "type": { "kind": "instance_of", "type": { - "name": "integer", - "namespace": "_types" + "name": "Suggester", + "namespace": "_global.search._types" } } - } - ], - "specLocation": "_global/search/_types/suggester.ts#L183-L194" - }, - { - "kind": "interface", - "name": { - "name": "Rescore", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "containerProperty": true, - "name": "window_size", + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "name": "terminate_after", "required": false, + "serverDefault": 0, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } }, { - "name": "query", + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "name": "timeout", "required": false, "type": { "kind": "instance_of", "type": { - "name": "RescoreQuery", - "namespace": "_global.search._types" + "name": "string", + "namespace": "_builtins" } } }, { - "name": "learning_to_rank", + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "name": "track_scores", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "LearningToRank", - "namespace": "_global.search._types" + "name": "boolean", + "namespace": "_builtins" } } - } - ], - "specLocation": "_global/search/_types/rescoring.ts#L25-L38", - "variants": { - "kind": "container", - "nonExhaustive": true - } - }, - { - "kind": "interface", - "name": { - "name": "RescoreQuery", - "namespace": "_global.search._types" - }, - "properties": [ + }, { - "codegenName": "Query", - "description": "The query to use for rescoring.\nThis query is only run on the Top-K results returned by the `query` and `post_filter` phases.", - "name": "rescore_query", - "required": true, + "description": "If `true`, the request returns the document version as part of a hit.", + "name": "version", + "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "Relative importance of the original query versus the rescore query.", - "name": "query_weight", + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", + "extDocId": "optimistic-concurrency", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html", + "name": "seq_no_primary_term", "required": false, - "serverDefault": 1, "type": { "kind": "instance_of", "type": { - "name": "double", - "namespace": "_types" + "name": "boolean", + "namespace": "_builtins" } } }, { - "description": "Relative importance of the rescore query versus the original query.", - "name": "rescore_query_weight", + "description": "A comma-separated list of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` property defaults to `false`.\nYou can pass `_source: true` to return both source fields and stored fields in the search response.", + "extDocId": "stored-fields", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#stored-fields", + "name": "stored_fields", "required": false, - "serverDefault": 1, "type": { "kind": "instance_of", "type": { - "name": "double", + "name": "Fields", "namespace": "_types" } } }, { - "description": "Determines how scores are combined.", - "name": "score_mode", + "description": "Limit the search to a point in time (PIT).\nIf you provide a PIT, you cannot specify an `` in the request path.", + "name": "pit", "required": false, - "serverDefault": "total", "type": { "kind": "instance_of", "type": { - "name": "ScoreMode", + "name": "PointInTimeReference", "namespace": "_global.search._types" } } - } - ], - "specLocation": "_global/search/_types/rescoring.ts#L40-L62" - }, - { - "kind": "enum", - "members": [ - { - "description": "Average the original score and the rescore query score.", - "name": "avg" - }, - { - "description": "Take the max of original score and the rescore query score.", - "name": "max" - }, - { - "description": "Take the min of the original score and the rescore query score.", - "name": "min" - }, - { - "description": "Multiply the original score by the rescore query score.\nUseful for `function` query rescores.", - "name": "multiply" }, { - "description": "Add the original score and the rescore query score.", - "name": "total" - } - ], - "name": { - "name": "ScoreMode", - "namespace": "_global.search._types" - }, - "specLocation": "_global/search/_types/rescoring.ts#L64-L86" - }, - { - "kind": "interface", - "name": { - "name": "SearchProfile", - "namespace": "_global.search._types" - }, - "properties": [ - { - "name": "collector", - "required": true, + "description": "One or more runtime fields in the search request.\nThese fields take precedence over mapped fields with the same name.", + "extDocId": "runtime-search-request", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime-search-request.html", + "name": "runtime_mappings", + "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "Collector", - "namespace": "_global.search._types" - } + "kind": "instance_of", + "type": { + "name": "RuntimeFields", + "namespace": "_types.mapping" } } }, { - "name": "query", - "required": true, + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "name": "stats", + "required": false, "type": { "kind": "array_of", "value": { "kind": "instance_of", "type": { - "name": "QueryProfile", - "namespace": "_global.search._types" + "name": "string", + "namespace": "_builtins" } } } - }, - { - "name": "rewrite_time", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } } ], - "specLocation": "_global/search/_types/profile.ts#L136-L140" + "specLocation": "_global/search/_types/SearchRequestBody.ts#L42-L238" }, { "kind": "interface", @@ -52532,7 +52607,7 @@ } ], "shortcutProperty": "source", - "specLocation": "_types/Scripting.ts#L75-L99" + "specLocation": "_types/Scripting.ts#L65-L89" }, { "kind": "interface", @@ -52564,7 +52639,7 @@ } } ], - "specLocation": "_types/Scripting.ts#L101-L104" + "specLocation": "_types/Scripting.ts#L91-L94" }, { "kind": "enum", @@ -52591,7 +52666,7 @@ "name": "ScriptLanguage", "namespace": "_types" }, - "specLocation": "_types/Scripting.ts#L24-L45" + "specLocation": "_types/Scripting.ts#L25-L46" }, { "kind": "interface", @@ -52677,6 +52752,37 @@ }, "specLocation": "_types/sort.ts#L80-L84" }, + { + "kind": "type_alias", + "codegenNames": [ + "script_string", + "script_template" + ], + "name": { + "name": "ScriptSource", + "namespace": "_types" + }, + "specLocation": "_types/Scripting.ts#L48-L49", + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "SearchRequestBody", + "namespace": "_global.search._types" + } + } + ] + } + }, { "kind": "interface", "name": { @@ -54090,13 +54196,13 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } ], - "specLocation": "_types/Scripting.ts#L47-L59" + "specLocation": "_types/Scripting.ts#L51-L63" }, { "kind": "type_alias", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index babdec33d1..a9d4c513e8 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -44,6 +44,12 @@ ], "response": [] }, + "fleet.msearch": { + "request": [ + "interface definition _types:RankContainer - Property rrf is a single-variant and must be required" + ], + "response": [] + }, "get_source": { "request": [ "Request: query parameter 'stored_fields' does not exist in the json spec" @@ -87,12 +93,6 @@ ], "response": [] }, - "search": { - "request": [ - "interface definition _types:RankContainer - Property rrf is a single-variant and must be required" - ], - "response": [] - }, "search_mvt": { "request": [ "Request: query parameter 'grid_agg' does not exist in the json spec", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 7d5e82ba29..95cf8719d4 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -766,41 +766,6 @@ export interface MsearchMultiSearchResult { responses: MsearchResponseItem[] } -export interface MsearchMultisearchBody { - aggregations?: Record - aggs?: Record - collapse?: SearchFieldCollapse - query?: QueryDslQueryContainer - explain?: boolean - ext?: Record - stored_fields?: Fields - docvalue_fields?: (QueryDslFieldAndFormat | Field)[] - knn?: KnnSearch | KnnSearch[] - from?: integer - highlight?: SearchHighlight - indices_boost?: Partial>[] - min_score?: double - post_filter?: QueryDslQueryContainer - profile?: boolean - rescore?: SearchRescore | SearchRescore[] - script_fields?: Record - search_after?: SortResults - size?: integer - sort?: Sort - _source?: SearchSourceConfig - fields?: (QueryDslFieldAndFormat | Field)[] - terminate_after?: long - stats?: string[] - timeout?: string - track_scores?: boolean - track_total_hits?: SearchTrackHits - version?: boolean - runtime_mappings?: MappingRuntimeFields - seq_no_primary_term?: boolean - pit?: SearchPointInTimeReference - suggest?: SearchSuggester -} - export interface MsearchMultisearchHeader { allow_no_indices?: boolean expand_wildcards?: ExpandWildcards @@ -833,7 +798,7 @@ export interface MsearchRequest extends RequestBase { body?: MsearchRequestItem[] } -export type MsearchRequestItem = MsearchMultisearchHeader | MsearchMultisearchBody +export type MsearchRequestItem = MsearchMultisearchHeader | SearchSearchRequestBody export type MsearchResponse = MsearchMultiSearchResult @@ -1762,6 +1727,44 @@ export interface SearchSearchProfile { rewrite_time: long } +export interface SearchSearchRequestBody { + aggregations?: Record + aggs?: Record + collapse?: SearchFieldCollapse + explain?: boolean + ext?: Record + from?: integer + highlight?: SearchHighlight + track_total_hits?: SearchTrackHits + indices_boost?: Partial>[] + docvalue_fields?: (QueryDslFieldAndFormat | Field)[] + knn?: KnnSearch | KnnSearch[] + rank?: RankContainer + min_score?: double + post_filter?: QueryDslQueryContainer + profile?: boolean + query?: QueryDslQueryContainer + rescore?: SearchRescore | SearchRescore[] + retriever?: RetrieverContainer + script_fields?: Record + search_after?: SortResults + size?: integer + slice?: SlicedScroll + sort?: Sort + _source?: SearchSourceConfig + fields?: (QueryDslFieldAndFormat | Field)[] + suggest?: SearchSuggester + terminate_after?: long + timeout?: string + track_scores?: boolean + version?: boolean + seq_no_primary_term?: boolean + stored_fields?: Fields + pit?: SearchPointInTimeReference + runtime_mappings?: MappingRuntimeFields + stats?: string[] +} + export interface SearchShardProfile { aggregations: SearchAggregationProfile[] cluster: string @@ -2796,6 +2799,8 @@ export interface ScriptSort { export type ScriptSortType = 'string' | 'number' | 'version' +export type ScriptSource = string | SearchSearchRequestBody + export interface ScriptTransform { lang?: string params?: Record @@ -2935,7 +2940,7 @@ export interface StoreStats { export interface StoredScript { lang: ScriptLanguage options?: Record - source: string + source: ScriptSource } export type StreamResult = ArrayBuffer diff --git a/specification/_global/msearch/types.ts b/specification/_global/msearch/types.ts index 4ae3b7e3ff..23249bd5a5 100644 --- a/specification/_global/msearch/types.ts +++ b/specification/_global/msearch/types.ts @@ -18,36 +18,15 @@ */ import { ResponseBody as SearchResponse } from '@global/search/SearchResponse' -import { FieldCollapse } from '@global/search/_types/FieldCollapse' -import { Highlight } from '@global/search/_types/highlighting' -import { TrackHits } from '@global/search/_types/hits' -import { PointInTimeReference } from '@global/search/_types/PointInTimeReference' -import { Rescore } from '@global/search/_types/rescoring' -import { SourceConfig } from '@global/search/_types/SourceFilter' -import { Suggester } from '@global/search/_types/suggester' -import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary' -import { UserDefinedValue } from '@spec_utils/UserDefinedValue' -import { AggregationContainer } from '@_types/aggregations/AggregationContainer' +import { SearchRequestBody } from '@global/search/_types/SearchRequestBody' import { ErrorResponseBase } from '@_types/Base' -import { - ExpandWildcards, - Fields, - IndexName, - Indices, - Routing, - SearchType -} from '@_types/common' -import { KnnSearch } from '@_types/Knn' -import { RuntimeFields } from '@_types/mapping/RuntimeFields' -import { double, integer, long } from '@_types/Numeric' -import { FieldAndFormat, QueryContainer } from '@_types/query_dsl/abstractions' -import { ScriptField } from '@_types/Scripting' -import { Sort, SortResults } from '@_types/sort' +import { ExpandWildcards, Indices, Routing, SearchType } from '@_types/common' +import { integer, long } from '@_types/Numeric' /** * @codegen_names header, body */ -export type RequestItem = MultisearchHeader | MultisearchBody +export type RequestItem = MultisearchHeader | SearchRequestBody /** * Contains parameters used to limit or change the subsequent search body request. @@ -66,143 +45,6 @@ export class MultisearchHeader { ignore_throttled?: boolean } -// We should keep this in sync with the normal search request body. -export class MultisearchBody { - /** - * @aliases aggs - * @ext_doc_id search-aggregations - */ // ES uses "aggregations" in serialization - aggregations?: Dictionary - collapse?: FieldCollapse - /** - * Defines the search definition using the Query DSL. - */ - query?: QueryContainer - /** - * If true, returns detailed information about score computation as part of a hit. - * @server_default false - */ - explain?: boolean - /** - * Configuration of search extensions defined by Elasticsearch plugins. - */ - ext?: Dictionary - /** - * List of stored fields to return as part of a hit. If no fields are specified, - * no stored fields are included in the response. If this field is specified, the _source - * parameter defaults to false. You can pass _source: true to return both source fields - * and stored fields in the search response. - */ - stored_fields?: Fields - /** - * Array of wildcard (*) patterns. The request returns doc values for field - * names matching these patterns in the hits.fields property of the response. - */ - docvalue_fields?: FieldAndFormat[] - /** - * Defines the approximate kNN search to run. - * @availability stack since=8.4.0 - * @availability serverless - */ - knn?: KnnSearch | KnnSearch[] - /** - * Starting document offset. By default, you cannot page through more than 10,000 - * hits using the from and size parameters. To page through more hits, use the - * search_after parameter. - * @server_default 0 - */ - from?: integer - highlight?: Highlight - /** - * Boosts the _score of documents from specified indices. - */ - indices_boost?: Array> - /** - * Minimum _score for matching documents. Documents with a lower _score are - * not included in the search results. - */ - min_score?: double - post_filter?: QueryContainer - profile?: boolean - rescore?: Rescore | Rescore[] - /** - * Retrieve a script evaluation (based on different fields) for each hit. - */ - script_fields?: Dictionary - search_after?: SortResults - /** - * The number of hits to return. By default, you cannot page through more - * than 10,000 hits using the from and size parameters. To page through more - * hits, use the search_after parameter. - * @server_default 10 - */ - size?: integer - /** @doc_id sort-search-results */ - sort?: Sort - /** - * Indicates which source fields are returned for matching documents. These - * fields are returned in the hits._source property of the search response. - */ - _source?: SourceConfig - /** - * Array of wildcard (*) patterns. The request returns values for field names - * matching these patterns in the hits.fields property of the response. - */ - fields?: Array - /** - * Maximum number of documents to collect for each shard. If a query reaches this - * limit, Elasticsearch terminates the query early. Elasticsearch collects documents - * before sorting. Defaults to 0, which does not terminate query execution early. - * @server_default 0 - */ - terminate_after?: long - /** - * Stats groups to associate with the search. Each group maintains a statistics - * aggregation for its associated searches. You can retrieve these stats using - * the indices stats API. - */ - stats?: string[] - /** - * Specifies the period of time to wait for a response from each shard. If no response - * is received before the timeout expires, the request fails and returns an error. - * Defaults to no timeout. - */ - timeout?: string - /** - * If true, calculate and return document scores, even if the scores are not used for sorting. - * @server_default false - */ - track_scores?: boolean - /** - * Number of hits matching the query to count accurately. If true, the exact - * number of hits is returned at the cost of some performance. If false, the - * response does not include the total number of hits matching the query. - * Defaults to 10,000 hits. - */ - track_total_hits?: TrackHits - /** - * If true, returns document version as part of a hit. - * @server_default false - */ - version?: boolean - /** - * Defines one or more runtime fields in the search request. These fields take - * precedence over mapped fields with the same name. - */ - runtime_mappings?: RuntimeFields - /** - * If true, returns sequence number and primary term of the last modification - * of each hit. See Optimistic concurrency control. - */ - seq_no_primary_term?: boolean - /** - * Limits the search to a point in time (PIT). If you provide a PIT, you - * cannot specify an in the request path. - */ - pit?: PointInTimeReference - suggest?: Suggester -} - export class MultiSearchResult { took: long responses: Array> diff --git a/specification/_global/search/SearchRequest.ts b/specification/_global/search/SearchRequest.ts index f46cac029f..929edf9e55 100644 --- a/specification/_global/search/SearchRequest.ts +++ b/specification/_global/search/SearchRequest.ts @@ -17,7 +17,12 @@ * under the License. */ +import { FieldCollapse } from '@global/search/_types/FieldCollapse' +import { Highlight } from '@global/search/_types/highlighting' import { TrackHits } from '@global/search/_types/hits' +import { PointInTimeReference } from '@global/search/_types/PointInTimeReference' +import { Rescore } from '@global/search/_types/rescoring' +import { Suggester } from '@global/search/_types/suggester' import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { AggregationContainer } from '@_types/aggregations/AggregationContainer' @@ -43,12 +48,7 @@ import { ScriptField } from '@_types/Scripting' import { SlicedScroll } from '@_types/SlicedScroll' import { Sort, SortResults } from '@_types/sort' import { Duration } from '@_types/Time' -import { FieldCollapse } from './_types/FieldCollapse' -import { Highlight } from './_types/highlighting' -import { PointInTimeReference } from './_types/PointInTimeReference' -import { Rescore } from './_types/rescoring' import { SourceConfig, SourceConfigParam } from './_types/SourceFilter' -import { Suggester } from './_types/suggester' /** * Run a search. @@ -383,7 +383,7 @@ export interface Request extends RequestBase { */ force_synthetic_source?: boolean } - // We should keep this in sync with the multi search request body. + // Keep this in sync with global/search/_types/SearchRequestBody.ts body: { /** * Defines the aggregations that are run as part of the search request. diff --git a/specification/_global/search/_types/SearchRequestBody.ts b/specification/_global/search/_types/SearchRequestBody.ts new file mode 100644 index 0000000000..f242db8bd7 --- /dev/null +++ b/specification/_global/search/_types/SearchRequestBody.ts @@ -0,0 +1,238 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { FieldCollapse } from '@global/search/_types/FieldCollapse' +import { Highlight } from '@global/search/_types/highlighting' +import { TrackHits } from '@global/search/_types/hits' +import { PointInTimeReference } from '@global/search/_types/PointInTimeReference' +import { Rescore } from '@global/search/_types/rescoring' +import { SourceConfig } from '@global/search/_types/SourceFilter' +import { Suggester } from '@global/search/_types/suggester' +import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary' +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' +import { AggregationContainer } from '@_types/aggregations/AggregationContainer' +import { Fields, IndexName } from '@_types/common' +import { KnnSearch } from '@_types/Knn' +import { RuntimeFields } from '@_types/mapping/RuntimeFields' +import { double, integer, long } from '@_types/Numeric' +import { FieldAndFormat, QueryContainer } from '@_types/query_dsl/abstractions' +import { RankContainer } from '@_types/Rank' +import { RetrieverContainer } from '@_types/Retriever' +import { ScriptField } from '@_types/Scripting' +import { SlicedScroll } from '@_types/SlicedScroll' +import { Sort, SortResults } from '@_types/sort' + +// Keep this in sync with the body of /_global/search/SearchRequest.ts +export class SearchRequestBody { + /** + * Defines the aggregations that are run as part of the search request. + * @aliases aggs */ // ES uses "aggregations" in serialization + aggregations?: Dictionary + /** + * Collapses search results the values of the specified field. + */ + collapse?: FieldCollapse + /** + * If `true`, the request returns detailed information about score computation as part of a hit. + * @server_default false + */ + explain?: boolean + /** + * Configuration of search extensions defined by Elasticsearch plugins. + */ + ext?: Dictionary + /** + * The starting document offset, which must be non-negative. + * By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. + * To page through more hits, use the `search_after` parameter. + * @server_default 0 + */ + from?: integer + /** + * Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. + */ + highlight?: Highlight + /** + * Number of hits matching the query to count accurately. + * If `true`, the exact number of hits is returned at the cost of some performance. + * If `false`, the response does not include the total number of hits matching the query. + * @server_default 10000 + */ + track_total_hits?: TrackHits + /** + * Boost the `_score` of documents from specified indices. + * The boost value is the factor by which scores are multiplied. + * A boost value greater than `1.0` increases the score. + * A boost value between `0` and `1.0` decreases the score. + * @ext_doc_id relevance-scores + */ + indices_boost?: Array> + /** + * An array of wildcard (`*`) field patterns. + * The request returns doc values for field names matching these patterns in the `hits.fields` property of the response. + * @ext_doc_id docvalue-fields + */ + docvalue_fields?: FieldAndFormat[] + /** + * The approximate kNN search to run. + * @availability stack since=8.4.0 + * @availability serverless + * @ext_doc_id knn-approximate + */ + knn?: KnnSearch | KnnSearch[] + /** + * The Reciprocal Rank Fusion (RRF) to use. + * @availability stack since=8.8.0 + */ + rank?: RankContainer + /** + * The minimum `_score` for matching documents. + * Documents with a lower `_score` are not included in the search results. + */ + min_score?: double + /** + * Use the `post_filter` parameter to filter search results. + * The search hits are filtered after the aggregations are calculated. + * A post filter has no impact on the aggregation results. + */ + post_filter?: QueryContainer + /** + * Set to `true` to return detailed timing information about the execution of individual components in a search request. + * NOTE: This is a debugging tool and adds significant overhead to search execution. + * @server_default false + */ + profile?: boolean + /** + * The search definition using the Query DSL. + * @ext_doc_id query-dsl + */ + query?: QueryContainer + /** + * Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases. + */ + rescore?: Rescore | Rescore[] + /** + * A retriever is a specification to describe top documents returned from a search. + * A retriever replaces other elements of the search API that also return top documents such as `query` and `knn`. + * @availability stack since=8.14.0 stability=stable + * @availability serverless stability=stable + */ + retriever?: RetrieverContainer + /** + * Retrieve a script evaluation (based on different fields) for each hit. + */ + script_fields?: Dictionary + /** + * Used to retrieve the next page of hits using a set of sort values from the previous page. + */ + search_after?: SortResults + /** + * The number of hits to return, which must not be negative. + * By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. + * To page through more hits, use the `search_after` property. + * @server_default 10 + */ + size?: integer + /** + * Split a scrolled search into multiple slices that can be consumed independently. + */ + slice?: SlicedScroll + /** + * A comma-separated list of : pairs. + * @ext_doc_id sort-search-results + */ + sort?: Sort + /** + * The source fields that are returned for matching documents. + * These fields are returned in the `hits._source` property of the search response. + * If the `stored_fields` property is specified, the `_source` property defaults to `false`. + * Otherwise, it defaults to `true`. + * @ext_doc_id source-filtering + */ + _source?: SourceConfig + /** + * An array of wildcard (`*`) field patterns. + * The request returns values for field names matching these patterns in the `hits.fields` property of the response. + */ + fields?: Array + /** + * Defines a suggester that provides similar looking terms based on a provided text. + */ + suggest?: Suggester + /** + * The maximum number of documents to collect for each shard. + * If a query reaches this limit, Elasticsearch terminates the query early. + * Elasticsearch collects documents before sorting. + * + * IMPORTANT: Use with caution. + * Elasticsearch applies this property to each shard handling the request. + * When possible, let Elasticsearch perform early termination automatically. + * Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers. + * + * If set to `0` (default), the query does not terminate early. + * @server_default 0 + */ + terminate_after?: long + /** + * The period of time to wait for a response from each shard. + * If no response is received before the timeout expires, the request fails and returns an error. + * Defaults to no timeout. + */ + timeout?: string + /** + * If `true`, calculate and return document scores, even if the scores are not used for sorting. + * @server_default false + */ + track_scores?: boolean + /** + * If `true`, the request returns the document version as part of a hit. + * @server_default false + */ + version?: boolean + /** + * If `true`, the request returns sequence number and primary term of the last modification of each hit. + * @ext_doc_id optimistic-concurrency + */ + seq_no_primary_term?: boolean + /** + * A comma-separated list of stored fields to return as part of a hit. + * If no fields are specified, no stored fields are included in the response. + * If this field is specified, the `_source` property defaults to `false`. + * You can pass `_source: true` to return both source fields and stored fields in the search response. + * @ext_doc_id stored-fields + */ + stored_fields?: Fields + /** + * Limit the search to a point in time (PIT). + * If you provide a PIT, you cannot specify an `` in the request path. + */ + pit?: PointInTimeReference + /** + * One or more runtime fields in the search request. + * These fields take precedence over mapped fields with the same name. + * @ext_doc_id runtime-search-request + */ + runtime_mappings?: RuntimeFields + /** + * The stats groups to associate with the search. + * Each group maintains a statistics aggregation for its associated searches. + * You can retrieve these stats using the indices stats API. + */ + stats?: string[] +} diff --git a/specification/_types/Scripting.ts b/specification/_types/Scripting.ts index fe76655c5d..82110076d5 100644 --- a/specification/_types/Scripting.ts +++ b/specification/_types/Scripting.ts @@ -17,6 +17,7 @@ * under the License. */ +import { SearchRequestBody } from '@global/search/_types/SearchRequestBody' import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { Id } from './common' @@ -44,6 +45,9 @@ export enum ScriptLanguage { java } +/** @codegen_names script_string, script_template */ +export type ScriptSource = string | SearchRequestBody + export class StoredScript { /** * The language the script is written in. @@ -55,21 +59,7 @@ export class StoredScript { * The script source. * For search templates, an object containing the search template. */ - source: string -} - -export class ScriptBase { - /** - * Specifies any named parameters that are passed into the script as variables. - * Use parameters instead of hard-coded values to decrease compile time. - */ - params?: Dictionary - /** - * Specifies the language the script is written in. - * @server_default painless - */ - lang?: ScriptLanguage - options?: Dictionary + source: ScriptSource } /** From c01905d2d284fc858684d16a061ab06e9588b79f Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Thu, 27 Mar 2025 16:47:58 +0100 Subject: [PATCH 2/2] many more scripts --- output/openapi/elasticsearch-openapi.json | 2078 ++++++++--------- .../elasticsearch-serverless-openapi.json | 2006 ++++++++-------- output/schema/schema-serverless.json | 162 +- output/schema/schema.json | 130 +- output/schema/validation-errors.json | 9 +- output/typescript/types.ts | 110 +- .../_global/msearch_template/types.ts | 3 +- .../RenderSearchTemplateRequest.ts | 3 +- .../_global/search/_types/suggester.ts | 3 +- .../search_template/SearchTemplateRequest.ts | 3 +- specification/_types/Scripting.ts | 4 +- specification/_types/Transform.ts | 3 +- specification/ingest/_types/Processors.ts | 6 +- specification/watcher/_types/Conditions.ts | 5 +- 14 files changed, 2257 insertions(+), 2268 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index a5d1963735..a1899967b5 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -50755,8 +50755,7 @@ "type": "object", "properties": { "source": { - "description": "The script source.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" }, "id": { "$ref": "#/components/schemas/_types:Id" @@ -50779,260 +50778,230 @@ } } }, - "_types:ScriptLanguage": { - "anyOf": [ + "_types:ScriptSource": { + "oneOf": [ { - "type": "string", - "enum": [ - "painless", - "expression", - "mustache", - "java" - ] + "type": "string" }, { - "type": "string" + "$ref": "#/components/schemas/_global.search._types:SearchRequestBody" } ] }, - "_types.query_dsl:FunctionScoreMode": { - "type": "string", - "enum": [ - "multiply", - "sum", - "avg", - "first", - "max", - "min" - ] - }, - "_types.query_dsl:FuzzyQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + "_global.search._types:SearchRequestBody": { + "type": "object", + "properties": { + "aggregations": { + "description": "Defines the aggregations that are run as part of the search request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations:AggregationContainer" + } }, - { + "collapse": { + "$ref": "#/components/schemas/_global.search._types:FieldCollapse" + }, + "explain": { + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", "type": "object", - "properties": { - "max_expansions": { - "description": "Maximum number of variations created.", - "type": "number" - }, - "prefix_length": { - "description": "Number of beginning characters left unchanged when creating expansions.", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "type": "number" + }, + "highlight": { + "$ref": "#/components/schemas/_global.search._types:Highlight" + }, + "track_total_hits": { + "$ref": "#/components/schemas/_global.search._types:TrackHits" + }, + "indices_boost": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html#relevance-scores" + }, + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { "type": "number" }, - "rewrite": { - "$ref": "#/components/schemas/_types:MultiTermQueryRewrite" - }, - "transpositions": { - "description": "Indicates whether edits include transpositions of two adjacent characters (for example `ab` to `ba`).", - "type": "boolean" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types:Fuzziness" + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#docvalue-fields" + }, + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" + } + }, + "knn": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#approximate-knn" + }, + "description": "The approximate kNN search to run.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types:KnnSearch" }, - "value": { - "description": "Term you wish to find in the provided field.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:KnnSearch" + } } - }, - "required": [ - "value" ] - } - ] - }, - "_types:MultiTermQueryRewrite": { - "type": "string" - }, - "_types:Fuzziness": { - "oneOf": [ - { - "type": "string" }, - { + "rank": { + "$ref": "#/components/schemas/_types:RankContainer" + }, + "min_score": { + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in the search results.", "type": "number" - } - ] - }, - "_types.query_dsl:GeoBoundingBoxQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" }, - { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/_types.query_dsl:GeoExecution" - }, - "validation_method": { - "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" - }, - "ignore_unmapped": { - "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", - "type": "boolean" - } - } - } - ] - }, - "_types.query_dsl:GeoExecution": { - "type": "string", - "enum": [ - "memory", - "indexed" - ] - }, - "_types.query_dsl:GeoValidationMethod": { - "type": "string", - "enum": [ - "coerce", - "ignore_malformed", - "strict" - ] - }, - "_types.query_dsl:GeoDistanceQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + "post_filter": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" }, - { - "type": "object", - "properties": { - "distance": { - "$ref": "#/components/schemas/_types:Distance" - }, - "distance_type": { - "$ref": "#/components/schemas/_types:GeoDistanceType" - }, - "validation_method": { - "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" + "profile": { + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "type": "boolean" + }, + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "rescore": { + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types:Rescore" }, - "ignore_unmapped": { - "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", - "type": "boolean" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types:Rescore" + } } - }, - "required": [ - "distance" ] - } - ] - }, - "_types:GeoDistanceType": { - "type": "string", - "enum": [ - "arc", - "plane" - ] - }, - "_types.query_dsl:GeoGridQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" }, - { - "type": "object", - "properties": { - "geogrid": { - "$ref": "#/components/schemas/_types:GeoTile" - }, - "geohash": { - "$ref": "#/components/schemas/_types:GeoHash" - }, - "geohex": { - "$ref": "#/components/schemas/_types:GeoHexCell" - } - }, - "minProperties": 1, - "maxProperties": 1 - } - ] - }, - "_types.query_dsl:GeoPolygonQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" }, - { + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", "type": "object", - "properties": { - "validation_method": { - "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" - }, - "ignore_unmapped": { - "type": "boolean" - } + "additionalProperties": { + "$ref": "#/components/schemas/_types:ScriptField" } - } - ] - }, - "_types.query_dsl:GeoShapeQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" }, - { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", - "type": "boolean" - } + "search_after": { + "$ref": "#/components/schemas/_types:SortResults" + }, + "size": { + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "type": "number" + }, + "slice": { + "$ref": "#/components/schemas/_types:SlicedScroll" + }, + "sort": { + "$ref": "#/components/schemas/_types:Sort" + }, + "_source": { + "$ref": "#/components/schemas/_global.search._types:SourceConfig" + }, + "fields": { + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" + } + }, + "suggest": { + "$ref": "#/components/schemas/_global.search._types:Suggester" + }, + "terminate_after": { + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "type": "number" + }, + "timeout": { + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "type": "boolean" + }, + "version": { + "description": "If `true`, the request returns the document version as part of a hit.", + "type": "boolean" + }, + "seq_no_primary_term": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html" + }, + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", + "type": "boolean" + }, + "stored_fields": { + "$ref": "#/components/schemas/_types:Fields" + }, + "pit": { + "$ref": "#/components/schemas/_global.search._types:PointInTimeReference" + }, + "runtime_mappings": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFields" + }, + "stats": { + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "type": "array", + "items": { + "type": "string" } } - ] + } }, - "_types.query_dsl:HasChildQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + "_global.search._types:FieldCollapse": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types:Field" }, - { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", - "type": "boolean" - }, - "inner_hits": { + "inner_hits": { + "description": "The number of inner hits and their sort order", + "oneOf": [ + { "$ref": "#/components/schemas/_global.search._types:InnerHits" }, - "max_children": { - "description": "Maximum number of child documents that match the query allowed for a returned parent document.\nIf the parent document exceeds this limit, it is excluded from the search results.", - "type": "number" - }, - "min_children": { - "description": "Minimum number of child documents that match the query required to match the query for a returned parent document.\nIf the parent document does not meet this limit, it is excluded from the search results.", - "type": "number" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "score_mode": { - "$ref": "#/components/schemas/_types.query_dsl:ChildScoreMode" - }, - "type": { - "$ref": "#/components/schemas/_types:RelationName" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types:InnerHits" + } } - }, - "required": [ - "query", - "type" ] + }, + "max_concurrent_group_searches": { + "description": "The number of concurrent requests allowed to retrieve the inner_hits per group", + "type": "number" + }, + "collapse": { + "$ref": "#/components/schemas/_global.search._types:FieldCollapse" } + }, + "required": [ + "field" ] }, "_global.search._types:InnerHits": { @@ -51099,38 +51068,6 @@ "_types:Name": { "type": "string" }, - "_global.search._types:FieldCollapse": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types:Field" - }, - "inner_hits": { - "description": "The number of inner hits and their sort order", - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types:InnerHits" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_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": { - "$ref": "#/components/schemas/_global.search._types:FieldCollapse" - } - }, - "required": [ - "field" - ] - }, "_types.query_dsl:FieldAndFormat": { "type": "object", "properties": { @@ -51433,6 +51370,13 @@ "median" ] }, + "_types:GeoDistanceType": { + "type": "string", + "enum": [ + "arc", + "plane" + ] + }, "_types:DistanceUnit": { "type": "string", "enum": [ @@ -51520,43 +51464,839 @@ } } }, - "_types.query_dsl:ChildScoreMode": { - "type": "string", - "enum": [ - "none", - "avg", - "sum", - "max", - "min" - ] - }, - "_types:RelationName": { - "type": "string" - }, - "_types.query_dsl:HasParentQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + "_types:KnnSearch": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types:Field" }, - { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.\nYou can use this parameter to query multiple indices that may not contain the `parent_type`.", - "type": "boolean" - }, - "inner_hits": { - "$ref": "#/components/schemas/_global.search._types:InnerHits" - }, - "parent_type": { - "$ref": "#/components/schemas/_types:RelationName" - }, - "query": { + "query_vector": { + "$ref": "#/components/schemas/_types:QueryVector" + }, + "query_vector_builder": { + "$ref": "#/components/schemas/_types:QueryVectorBuilder" + }, + "k": { + "description": "The final number of nearest neighbors to return as top hits", + "type": "number" + }, + "num_candidates": { + "description": "The number of nearest neighbor candidates to consider per shard", + "type": "number" + }, + "boost": { + "description": "Boost value to apply to kNN scores", + "type": "number" + }, + "filter": { + "description": "Filters for the kNN search query", + "oneOf": [ + { "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" }, - "score": { - "description": "Indicates whether the relevance score of a matching parent document is aggregated into its child documents.", - "type": "boolean" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + } + } + ] + }, + "similarity": { + "description": "The minimum similarity for a vector to be considered a match", + "type": "number" + }, + "inner_hits": { + "$ref": "#/components/schemas/_global.search._types:InnerHits" + }, + "rescore_vector": { + "$ref": "#/components/schemas/_types:RescoreVector" + } + }, + "required": [ + "field" + ] + }, + "_types:QueryVector": { + "type": "array", + "items": { + "type": "number" + } + }, + "_types:QueryVectorBuilder": { + "type": "object", + "properties": { + "text_embedding": { + "$ref": "#/components/schemas/_types:TextEmbedding" + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types:TextEmbedding": { + "type": "object", + "properties": { + "model_id": { + "type": "string" + }, + "model_text": { + "type": "string" + } + }, + "required": [ + "model_id", + "model_text" + ] + }, + "_types:RescoreVector": { + "type": "object", + "properties": { + "oversample": { + "description": "Applies the specified oversample factor to k on the approximate kNN search", + "type": "number" + } + }, + "required": [ + "oversample" + ] + }, + "_types:RankContainer": { + "type": "object", + "properties": { + "rrf": { + "$ref": "#/components/schemas/_types:RrfRank" + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types:RrfRank": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RankBase" + }, + { + "type": "object", + "properties": { + "rank_constant": { + "description": "How much influence documents in individual result sets per query have over the final ranked result set", + "type": "number" + }, + "rank_window_size": { + "description": "Size of the individual result sets per query", + "type": "number" + } + } + } + ] + }, + "_types:RankBase": { + "type": "object" + }, + "_global.search._types:Rescore": { + "allOf": [ + { + "type": "object", + "properties": { + "window_size": { + "type": "number" + } + } + }, + { + "type": "object", + "properties": { + "query": { + "$ref": "#/components/schemas/_global.search._types:RescoreQuery" + }, + "learning_to_rank": { + "$ref": "#/components/schemas/_global.search._types:LearningToRank" + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_global.search._types:RescoreQuery": { + "type": "object", + "properties": { + "rescore_query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "query_weight": { + "description": "Relative importance of the original query versus the rescore query.", + "type": "number" + }, + "rescore_query_weight": { + "description": "Relative importance of the rescore query versus the original query.", + "type": "number" + }, + "score_mode": { + "$ref": "#/components/schemas/_global.search._types:ScoreMode" + } + }, + "required": [ + "rescore_query" + ] + }, + "_global.search._types:ScoreMode": { + "type": "string", + "enum": [ + "avg", + "max", + "min", + "multiply", + "total" + ] + }, + "_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" + ] + }, + "_types:RetrieverContainer": { + "type": "object", + "properties": { + "standard": { + "$ref": "#/components/schemas/_types:StandardRetriever" + }, + "knn": { + "$ref": "#/components/schemas/_types:KnnRetriever" + }, + "rrf": { + "$ref": "#/components/schemas/_types:RRFRetriever" + }, + "text_similarity_reranker": { + "$ref": "#/components/schemas/_types:TextSimilarityReranker" + }, + "rule": { + "$ref": "#/components/schemas/_types:RuleRetriever" + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types:StandardRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "search_after": { + "$ref": "#/components/schemas/_types:SortResults" + }, + "terminate_after": { + "description": "Maximum number of documents to collect for each shard.", + "type": "number" + }, + "sort": { + "$ref": "#/components/schemas/_types:Sort" + }, + "collapse": { + "$ref": "#/components/schemas/_global.search._types:FieldCollapse" + } + } + } + ] + }, + "_types:RetrieverBase": { + "type": "object", + "properties": { + "filter": { + "description": "Query to filter the documents that can match.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + } + } + ] + }, + "min_score": { + "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", + "type": "number" + } + } + }, + "_types:KnnRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The name of the vector field to search against.", + "type": "string" + }, + "query_vector": { + "$ref": "#/components/schemas/_types:QueryVector" + }, + "query_vector_builder": { + "$ref": "#/components/schemas/_types:QueryVectorBuilder" + }, + "k": { + "description": "Number of nearest neighbors to return as top hits.", + "type": "number" + }, + "num_candidates": { + "description": "Number of nearest neighbor candidates to consider per shard.", + "type": "number" + }, + "similarity": { + "description": "The minimum similarity required for a document to be considered a match.", + "type": "number" + }, + "rescore_vector": { + "$ref": "#/components/schemas/_types:RescoreVector" + } + }, + "required": [ + "field", + "k", + "num_candidates" + ] + } + ] + }, + "_types:RRFRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "retrievers": { + "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + } + }, + "rank_constant": { + "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", + "type": "number" + }, + "rank_window_size": { + "description": "This value determines the size of the individual result sets per query.", + "type": "number" + } + }, + "required": [ + "retrievers" + ] + } + ] + }, + "_types:TextSimilarityReranker": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + }, + "rank_window_size": { + "description": "This value determines how many documents we will consider from the nested retriever.", + "type": "number" + }, + "inference_id": { + "description": "Unique identifier of the inference endpoint created using the inference API.", + "type": "string" + }, + "inference_text": { + "description": "The text snippet used as the basis for similarity comparison", + "type": "string" + }, + "field": { + "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", + "type": "string" + } + }, + "required": [ + "retriever" + ] + } + ] + }, + "_types:RuleRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "ruleset_ids": { + "description": "The ruleset IDs containing the rules this retriever is evaluating against.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:Id" + } + }, + "match_criteria": { + "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", + "type": "object" + }, + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + }, + "rank_window_size": { + "description": "This value determines the size of the individual result set.", + "type": "number" + } + }, + "required": [ + "ruleset_ids", + "match_criteria", + "retriever" + ] + } + ] + }, + "_types:SlicedScroll": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types:Field" + }, + "id": { + "$ref": "#/components/schemas/_types:Id" + }, + "max": { + "type": "number" + } + }, + "required": [ + "id", + "max" + ] + }, + "_global.search._types:Suggester": { + "type": "object", + "properties": { + "text": { + "description": "Global suggest text, to avoid repetition when the same text is used in several suggesters", + "type": "string" + } + } + }, + "_global.search._types:PointInTimeReference": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/_types:Id" + }, + "keep_alive": { + "$ref": "#/components/schemas/_types:Duration" + } + }, + "required": [ + "id" + ] + }, + "_types.mapping:RuntimeFields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping:RuntimeField" + } + }, + "_types.mapping:RuntimeField": { + "type": "object", + "properties": { + "fields": { + "description": "For type `composite`", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping:CompositeSubField" + } + }, + "fetch_fields": { + "description": "For type `lookup`", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFieldFetchFields" + } + }, + "format": { + "description": "A custom format for `date` type runtime fields.", + "type": "string" + }, + "input_field": { + "$ref": "#/components/schemas/_types:Field" + }, + "target_field": { + "$ref": "#/components/schemas/_types:Field" + }, + "target_index": { + "$ref": "#/components/schemas/_types:IndexName" + }, + "script": { + "$ref": "#/components/schemas/_types:Script" + }, + "type": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFieldType" + } + }, + "required": [ + "type" + ] + }, + "_types.mapping:CompositeSubField": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFieldType" + } + }, + "required": [ + "type" + ] + }, + "_types.mapping:RuntimeFieldType": { + "type": "string", + "enum": [ + "boolean", + "composite", + "date", + "double", + "geo_point", + "geo_shape", + "ip", + "keyword", + "long", + "lookup" + ] + }, + "_types.mapping:RuntimeFieldFetchFields": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types:Field" + }, + "format": { + "type": "string" + } + }, + "required": [ + "field" + ] + }, + "_types:ScriptLanguage": { + "anyOf": [ + { + "type": "string", + "enum": [ + "painless", + "expression", + "mustache", + "java" + ] + }, + { + "type": "string" + } + ] + }, + "_types.query_dsl:FunctionScoreMode": { + "type": "string", + "enum": [ + "multiply", + "sum", + "avg", + "first", + "max", + "min" + ] + }, + "_types.query_dsl:FuzzyQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "max_expansions": { + "description": "Maximum number of variations created.", + "type": "number" + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged when creating expansions.", + "type": "number" + }, + "rewrite": { + "$ref": "#/components/schemas/_types:MultiTermQueryRewrite" + }, + "transpositions": { + "description": "Indicates whether edits include transpositions of two adjacent characters (for example `ab` to `ba`).", + "type": "boolean" + }, + "fuzziness": { + "$ref": "#/components/schemas/_types:Fuzziness" + }, + "value": { + "description": "Term you wish to find in the provided field.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types:MultiTermQueryRewrite": { + "type": "string" + }, + "_types:Fuzziness": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "_types.query_dsl:GeoBoundingBoxQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/_types.query_dsl:GeoExecution" + }, + "validation_method": { + "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" + }, + "ignore_unmapped": { + "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "type": "boolean" + } + } + } + ] + }, + "_types.query_dsl:GeoExecution": { + "type": "string", + "enum": [ + "memory", + "indexed" + ] + }, + "_types.query_dsl:GeoValidationMethod": { + "type": "string", + "enum": [ + "coerce", + "ignore_malformed", + "strict" + ] + }, + "_types.query_dsl:GeoDistanceQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "distance": { + "$ref": "#/components/schemas/_types:Distance" + }, + "distance_type": { + "$ref": "#/components/schemas/_types:GeoDistanceType" + }, + "validation_method": { + "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" + }, + "ignore_unmapped": { + "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "type": "boolean" + } + }, + "required": [ + "distance" + ] + } + ] + }, + "_types.query_dsl:GeoGridQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "geogrid": { + "$ref": "#/components/schemas/_types:GeoTile" + }, + "geohash": { + "$ref": "#/components/schemas/_types:GeoHash" + }, + "geohex": { + "$ref": "#/components/schemas/_types:GeoHexCell" + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_types.query_dsl:GeoPolygonQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "validation_method": { + "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" + }, + "ignore_unmapped": { + "type": "boolean" + } + } + } + ] + }, + "_types.query_dsl:GeoShapeQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "type": "boolean" + } + } + } + ] + }, + "_types.query_dsl:HasChildQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", + "type": "boolean" + }, + "inner_hits": { + "$ref": "#/components/schemas/_global.search._types:InnerHits" + }, + "max_children": { + "description": "Maximum number of child documents that match the query allowed for a returned parent document.\nIf the parent document exceeds this limit, it is excluded from the search results.", + "type": "number" + }, + "min_children": { + "description": "Minimum number of child documents that match the query required to match the query for a returned parent document.\nIf the parent document does not meet this limit, it is excluded from the search results.", + "type": "number" + }, + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "score_mode": { + "$ref": "#/components/schemas/_types.query_dsl:ChildScoreMode" + }, + "type": { + "$ref": "#/components/schemas/_types:RelationName" + } + }, + "required": [ + "query", + "type" + ] + } + ] + }, + "_types.query_dsl:ChildScoreMode": { + "type": "string", + "enum": [ + "none", + "avg", + "sum", + "max", + "min" + ] + }, + "_types:RelationName": { + "type": "string" + }, + "_types.query_dsl:HasParentQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.\nYou can use this parameter to query multiple indices that may not contain the `parent_type`.", + "type": "boolean" + }, + "inner_hits": { + "$ref": "#/components/schemas/_global.search._types:InnerHits" + }, + "parent_type": { + "$ref": "#/components/schemas/_types:RelationName" + }, + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "score": { + "description": "Indicates whether the relevance score of a matching parent document is aggregated into its child documents.", + "type": "boolean" } }, "required": [ @@ -51883,49 +52623,6 @@ } ] }, - "_types:QueryVector": { - "type": "array", - "items": { - "type": "number" - } - }, - "_types:QueryVectorBuilder": { - "type": "object", - "properties": { - "text_embedding": { - "$ref": "#/components/schemas/_types:TextEmbedding" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types:TextEmbedding": { - "type": "object", - "properties": { - "model_id": { - "type": "string" - }, - "model_text": { - "type": "string" - } - }, - "required": [ - "model_id", - "model_text" - ] - }, - "_types:RescoreVector": { - "type": "object", - "properties": { - "oversample": { - "description": "Applies the specified oversample factor to k on the approximate kNN search", - "type": "number" - } - }, - "required": [ - "oversample" - ] - }, "_types.query_dsl:MatchQuery": { "allOf": [ { @@ -56829,263 +57526,6 @@ } } }, - "_types:KnnSearch": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types:Field" - }, - "query_vector": { - "$ref": "#/components/schemas/_types:QueryVector" - }, - "query_vector_builder": { - "$ref": "#/components/schemas/_types:QueryVectorBuilder" - }, - "k": { - "description": "The final number of nearest neighbors to return as top hits", - "type": "number" - }, - "num_candidates": { - "description": "The number of nearest neighbor candidates to consider per shard", - "type": "number" - }, - "boost": { - "description": "Boost value to apply to kNN scores", - "type": "number" - }, - "filter": { - "description": "Filters for the kNN search query", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - } - } - ] - }, - "similarity": { - "description": "The minimum similarity for a vector to be considered a match", - "type": "number" - }, - "inner_hits": { - "$ref": "#/components/schemas/_global.search._types:InnerHits" - }, - "rescore_vector": { - "$ref": "#/components/schemas/_types:RescoreVector" - } - }, - "required": [ - "field" - ] - }, - "_global.search._types:Rescore": { - "allOf": [ - { - "type": "object", - "properties": { - "window_size": { - "type": "number" - } - } - }, - { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_global.search._types:RescoreQuery" - }, - "learning_to_rank": { - "$ref": "#/components/schemas/_global.search._types:LearningToRank" - } - }, - "minProperties": 1, - "maxProperties": 1 - } - ] - }, - "_global.search._types:RescoreQuery": { - "type": "object", - "properties": { - "rescore_query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "query_weight": { - "description": "Relative importance of the original query versus the rescore query.", - "type": "number" - }, - "rescore_query_weight": { - "description": "Relative importance of the rescore query versus the original query.", - "type": "number" - }, - "score_mode": { - "$ref": "#/components/schemas/_global.search._types:ScoreMode" - } - }, - "required": [ - "rescore_query" - ] - }, - "_global.search._types:ScoreMode": { - "type": "string", - "enum": [ - "avg", - "max", - "min", - "multiply", - "total" - ] - }, - "_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" - ] - }, - "_types:SlicedScroll": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types:Field" - }, - "id": { - "$ref": "#/components/schemas/_types:Id" - }, - "max": { - "type": "number" - } - }, - "required": [ - "id", - "max" - ] - }, - "_global.search._types:Suggester": { - "type": "object", - "properties": { - "text": { - "description": "Global suggest text, to avoid repetition when the same text is used in several suggesters", - "type": "string" - } - } - }, - "_global.search._types:PointInTimeReference": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types:Id" - }, - "keep_alive": { - "$ref": "#/components/schemas/_types:Duration" - } - }, - "required": [ - "id" - ] - }, - "_types.mapping:RuntimeFields": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping:RuntimeField" - } - }, - "_types.mapping:RuntimeField": { - "type": "object", - "properties": { - "fields": { - "description": "For type `composite`", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping:CompositeSubField" - } - }, - "fetch_fields": { - "description": "For type `lookup`", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.mapping:RuntimeFieldFetchFields" - } - }, - "format": { - "description": "A custom format for `date` type runtime fields.", - "type": "string" - }, - "input_field": { - "$ref": "#/components/schemas/_types:Field" - }, - "target_field": { - "$ref": "#/components/schemas/_types:Field" - }, - "target_index": { - "$ref": "#/components/schemas/_types:IndexName" - }, - "script": { - "$ref": "#/components/schemas/_types:Script" - }, - "type": { - "$ref": "#/components/schemas/_types.mapping:RuntimeFieldType" - } - }, - "required": [ - "type" - ] - }, - "_types.mapping:CompositeSubField": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/_types.mapping:RuntimeFieldType" - } - }, - "required": [ - "type" - ] - }, - "_types.mapping:RuntimeFieldType": { - "type": "string", - "enum": [ - "boolean", - "composite", - "date", - "double", - "geo_point", - "geo_shape", - "ip", - "keyword", - "long", - "lookup" - ] - }, - "_types.mapping:RuntimeFieldFetchFields": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types:Field" - }, - "format": { - "type": "string" - } - }, - "required": [ - "field" - ] - }, "autoscaling.get_autoscaling_capacity:AutoscalingDeciders": { "type": "object", "properties": { @@ -73731,437 +74171,6 @@ } } }, - "_global.search._types:SearchRequestBody": { - "type": "object", - "properties": { - "aggregations": { - "description": "Defines the aggregations that are run as part of the search request.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations:AggregationContainer" - } - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types:FieldCollapse" - }, - "explain": { - "description": "If `true`, the request returns detailed information about score computation as part of a hit.", - "type": "boolean" - }, - "ext": { - "description": "Configuration of search extensions defined by Elasticsearch plugins.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "from": { - "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "type": "number" - }, - "highlight": { - "$ref": "#/components/schemas/_global.search._types:Highlight" - }, - "track_total_hits": { - "$ref": "#/components/schemas/_global.search._types:TrackHits" - }, - "indices_boost": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html#relevance-scores" - }, - "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "docvalue_fields": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#docvalue-fields" - }, - "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" - } - }, - "knn": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#approximate-knn" - }, - "description": "The approximate kNN search to run.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types:KnnSearch" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:KnnSearch" - } - } - ] - }, - "rank": { - "$ref": "#/components/schemas/_types:RankContainer" - }, - "min_score": { - "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in the search results.", - "type": "number" - }, - "post_filter": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "profile": { - "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", - "type": "boolean" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "rescore": { - "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types:Rescore" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types:Rescore" - } - } - ] - }, - "retriever": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - }, - "script_fields": { - "description": "Retrieve a script evaluation (based on different fields) for each hit.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types:ScriptField" - } - }, - "search_after": { - "$ref": "#/components/schemas/_types:SortResults" - }, - "size": { - "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", - "type": "number" - }, - "slice": { - "$ref": "#/components/schemas/_types:SlicedScroll" - }, - "sort": { - "$ref": "#/components/schemas/_types:Sort" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types:SourceConfig" - }, - "fields": { - "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" - } - }, - "suggest": { - "$ref": "#/components/schemas/_global.search._types:Suggester" - }, - "terminate_after": { - "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", - "type": "number" - }, - "timeout": { - "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", - "type": "string" - }, - "track_scores": { - "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", - "type": "boolean" - }, - "version": { - "description": "If `true`, the request returns the document version as part of a hit.", - "type": "boolean" - }, - "seq_no_primary_term": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html" - }, - "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", - "type": "boolean" - }, - "stored_fields": { - "$ref": "#/components/schemas/_types:Fields" - }, - "pit": { - "$ref": "#/components/schemas/_global.search._types:PointInTimeReference" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping:RuntimeFields" - }, - "stats": { - "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "_types:RankContainer": { - "type": "object", - "properties": { - "rrf": { - "$ref": "#/components/schemas/_types:RrfRank" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types:RrfRank": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RankBase" - }, - { - "type": "object", - "properties": { - "rank_constant": { - "description": "How much influence documents in individual result sets per query have over the final ranked result set", - "type": "number" - }, - "rank_window_size": { - "description": "Size of the individual result sets per query", - "type": "number" - } - } - } - ] - }, - "_types:RankBase": { - "type": "object" - }, - "_types:RetrieverContainer": { - "type": "object", - "properties": { - "standard": { - "$ref": "#/components/schemas/_types:StandardRetriever" - }, - "knn": { - "$ref": "#/components/schemas/_types:KnnRetriever" - }, - "rrf": { - "$ref": "#/components/schemas/_types:RRFRetriever" - }, - "text_similarity_reranker": { - "$ref": "#/components/schemas/_types:TextSimilarityReranker" - }, - "rule": { - "$ref": "#/components/schemas/_types:RuleRetriever" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types:StandardRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "search_after": { - "$ref": "#/components/schemas/_types:SortResults" - }, - "terminate_after": { - "description": "Maximum number of documents to collect for each shard.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types:Sort" - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types:FieldCollapse" - } - } - } - ] - }, - "_types:RetrieverBase": { - "type": "object", - "properties": { - "filter": { - "description": "Query to filter the documents that can match.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - } - } - ] - }, - "min_score": { - "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", - "type": "number" - } - } - }, - "_types:KnnRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "field": { - "description": "The name of the vector field to search against.", - "type": "string" - }, - "query_vector": { - "$ref": "#/components/schemas/_types:QueryVector" - }, - "query_vector_builder": { - "$ref": "#/components/schemas/_types:QueryVectorBuilder" - }, - "k": { - "description": "Number of nearest neighbors to return as top hits.", - "type": "number" - }, - "num_candidates": { - "description": "Number of nearest neighbor candidates to consider per shard.", - "type": "number" - }, - "similarity": { - "description": "The minimum similarity required for a document to be considered a match.", - "type": "number" - }, - "rescore_vector": { - "$ref": "#/components/schemas/_types:RescoreVector" - } - }, - "required": [ - "field", - "k", - "num_candidates" - ] - } - ] - }, - "_types:RRFRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "retrievers": { - "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - } - }, - "rank_constant": { - "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", - "type": "number" - }, - "rank_window_size": { - "description": "This value determines the size of the individual result sets per query.", - "type": "number" - } - }, - "required": [ - "retrievers" - ] - } - ] - }, - "_types:TextSimilarityReranker": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "retriever": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - }, - "rank_window_size": { - "description": "This value determines how many documents we will consider from the nested retriever.", - "type": "number" - }, - "inference_id": { - "description": "Unique identifier of the inference endpoint created using the inference API.", - "type": "string" - }, - "inference_text": { - "description": "The text snippet used as the basis for similarity comparison", - "type": "string" - }, - "field": { - "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", - "type": "string" - } - }, - "required": [ - "retriever" - ] - } - ] - }, - "_types:RuleRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "ruleset_ids": { - "description": "The ruleset IDs containing the rules this retriever is evaluating against.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:Id" - } - }, - "match_criteria": { - "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", - "type": "object" - }, - "retriever": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - }, - "rank_window_size": { - "description": "This value determines the size of the individual result set.", - "type": "number" - } - }, - "required": [ - "ruleset_ids", - "match_criteria", - "retriever" - ] - } - ] - }, "_global.msearch:ResponseItem": { "oneOf": [ { @@ -74341,16 +74350,6 @@ "source" ] }, - "_types:ScriptSource": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_global.search._types:SearchRequestBody" - } - ] - }, "_global.get_script_context:Context": { "type": "object", "properties": { @@ -81520,8 +81519,7 @@ "$ref": "#/components/schemas/_types:Id" }, "lang": { - "description": "Script language.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptLanguage" }, "params": { "description": "Object containing parameters for the script.", @@ -81531,8 +81529,7 @@ } }, "source": { - "description": "Inline script.\nIf no `id` is specified, this parameter is required.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } } } @@ -87878,8 +87875,7 @@ "type": "boolean" }, "source": { - "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } } }, @@ -96809,7 +96805,7 @@ "type": "object", "properties": { "lang": { - "type": "string" + "$ref": "#/components/schemas/_types:ScriptLanguage" }, "params": { "type": "object", @@ -96818,7 +96814,7 @@ } }, "source": { - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" }, "id": { "type": "string" @@ -96857,7 +96853,7 @@ } }, "source": { - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" }, "id": { "type": "string" @@ -116437,8 +116433,7 @@ } }, "source": { - "description": "An inline search template.\nIt supports the same parameters as the search API's request body.\nThese parameters also support Mustache variables.\nIf no `id` or `` is specified, this parameter is required.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } } }, @@ -116874,8 +116869,7 @@ "type": "boolean" }, "source": { - "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } } }, diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index d152549faf..a0883b9363 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -29894,8 +29894,7 @@ "type": "object", "properties": { "source": { - "description": "The script source.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" }, "id": { "$ref": "#/components/schemas/_types:Id" @@ -29918,260 +29917,227 @@ } } }, - "_types:ScriptLanguage": { - "anyOf": [ + "_types:ScriptSource": { + "oneOf": [ { - "type": "string", - "enum": [ - "painless", - "expression", - "mustache", - "java" - ] + "type": "string" }, { - "type": "string" + "$ref": "#/components/schemas/_global.search._types:SearchRequestBody" } ] }, - "_types.query_dsl:FunctionScoreMode": { - "type": "string", - "enum": [ - "multiply", - "sum", - "avg", - "first", - "max", - "min" - ] - }, - "_types.query_dsl:FuzzyQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + "_global.search._types:SearchRequestBody": { + "type": "object", + "properties": { + "aggregations": { + "description": "Defines the aggregations that are run as part of the search request.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.aggregations:AggregationContainer" + } }, - { + "collapse": { + "$ref": "#/components/schemas/_global.search._types:FieldCollapse" + }, + "explain": { + "description": "If `true`, the request returns detailed information about score computation as part of a hit.", + "type": "boolean" + }, + "ext": { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", "type": "object", - "properties": { - "max_expansions": { - "description": "Maximum number of variations created.", - "type": "number" - }, - "prefix_length": { - "description": "Number of beginning characters left unchanged when creating expansions.", + "additionalProperties": { + "type": "object" + } + }, + "from": { + "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", + "type": "number" + }, + "highlight": { + "$ref": "#/components/schemas/_global.search._types:Highlight" + }, + "track_total_hits": { + "$ref": "#/components/schemas/_global.search._types:TrackHits" + }, + "indices_boost": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html#relevance-scores" + }, + "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { "type": "number" }, - "rewrite": { - "$ref": "#/components/schemas/_types:MultiTermQueryRewrite" - }, - "transpositions": { - "description": "Indicates whether edits include transpositions of two adjacent characters (for example `ab` to `ba`).", - "type": "boolean" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types:Fuzziness" + "minProperties": 1, + "maxProperties": 1 + } + }, + "docvalue_fields": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#docvalue-fields" + }, + "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" + } + }, + "knn": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#approximate-knn" + }, + "description": "The approximate kNN search to run.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types:KnnSearch" }, - "value": { - "description": "Term you wish to find in the provided field.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:KnnSearch" + } } - }, - "required": [ - "value" ] - } - ] - }, - "_types:MultiTermQueryRewrite": { - "type": "string" - }, - "_types:Fuzziness": { - "oneOf": [ - { - "type": "string" }, - { + "min_score": { + "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in the search results.", "type": "number" - } - ] - }, - "_types.query_dsl:GeoBoundingBoxQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" }, - { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/_types.query_dsl:GeoExecution" - }, - "validation_method": { - "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" - }, - "ignore_unmapped": { - "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", - "type": "boolean" - } - } - } - ] - }, - "_types.query_dsl:GeoExecution": { - "type": "string", - "enum": [ - "memory", - "indexed" - ] - }, - "_types.query_dsl:GeoValidationMethod": { - "type": "string", - "enum": [ - "coerce", - "ignore_malformed", - "strict" - ] - }, - "_types.query_dsl:GeoDistanceQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + "post_filter": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" }, - { - "type": "object", - "properties": { - "distance": { - "$ref": "#/components/schemas/_types:Distance" - }, - "distance_type": { - "$ref": "#/components/schemas/_types:GeoDistanceType" - }, - "validation_method": { - "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" + "profile": { + "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", + "type": "boolean" + }, + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "rescore": { + "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types:Rescore" }, - "ignore_unmapped": { - "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", - "type": "boolean" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types:Rescore" + } } - }, - "required": [ - "distance" ] - } - ] - }, - "_types:GeoDistanceType": { - "type": "string", - "enum": [ - "arc", - "plane" - ] - }, - "_types.query_dsl:GeoGridQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" }, - { - "type": "object", - "properties": { - "geogrid": { - "$ref": "#/components/schemas/_types:GeoTile" - }, - "geohash": { - "$ref": "#/components/schemas/_types:GeoHash" - }, - "geohex": { - "$ref": "#/components/schemas/_types:GeoHexCell" - } - }, - "minProperties": 1, - "maxProperties": 1 - } - ] - }, - "_types.query_dsl:GeoPolygonQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" }, - { + "script_fields": { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", "type": "object", - "properties": { - "validation_method": { - "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" - }, - "ignore_unmapped": { - "type": "boolean" - } + "additionalProperties": { + "$ref": "#/components/schemas/_types:ScriptField" } - } - ] - }, - "_types.query_dsl:GeoShapeQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" }, - { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", - "type": "boolean" - } + "search_after": { + "$ref": "#/components/schemas/_types:SortResults" + }, + "size": { + "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", + "type": "number" + }, + "slice": { + "$ref": "#/components/schemas/_types:SlicedScroll" + }, + "sort": { + "$ref": "#/components/schemas/_types:Sort" + }, + "_source": { + "$ref": "#/components/schemas/_global.search._types:SourceConfig" + }, + "fields": { + "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" + } + }, + "suggest": { + "$ref": "#/components/schemas/_global.search._types:Suggester" + }, + "terminate_after": { + "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", + "type": "number" + }, + "timeout": { + "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", + "type": "string" + }, + "track_scores": { + "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", + "type": "boolean" + }, + "version": { + "description": "If `true`, the request returns the document version as part of a hit.", + "type": "boolean" + }, + "seq_no_primary_term": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html" + }, + "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", + "type": "boolean" + }, + "stored_fields": { + "$ref": "#/components/schemas/_types:Fields" + }, + "pit": { + "$ref": "#/components/schemas/_global.search._types:PointInTimeReference" + }, + "runtime_mappings": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFields" + }, + "stats": { + "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", + "type": "array", + "items": { + "type": "string" } } - ] + } }, - "_types.query_dsl:HasChildQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + "_global.search._types:FieldCollapse": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types:Field" }, - { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", - "type": "boolean" - }, - "inner_hits": { + "inner_hits": { + "description": "The number of inner hits and their sort order", + "oneOf": [ + { "$ref": "#/components/schemas/_global.search._types:InnerHits" }, - "max_children": { - "description": "Maximum number of child documents that match the query allowed for a returned parent document.\nIf the parent document exceeds this limit, it is excluded from the search results.", - "type": "number" - }, - "min_children": { - "description": "Minimum number of child documents that match the query required to match the query for a returned parent document.\nIf the parent document does not meet this limit, it is excluded from the search results.", - "type": "number" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "score_mode": { - "$ref": "#/components/schemas/_types.query_dsl:ChildScoreMode" - }, - "type": { - "$ref": "#/components/schemas/_types:RelationName" + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types:InnerHits" + } } - }, - "required": [ - "query", - "type" ] + }, + "max_concurrent_group_searches": { + "description": "The number of concurrent requests allowed to retrieve the inner_hits per group", + "type": "number" + }, + "collapse": { + "$ref": "#/components/schemas/_global.search._types:FieldCollapse" } + }, + "required": [ + "field" ] }, "_global.search._types:InnerHits": { @@ -30238,38 +30204,6 @@ "_types:Name": { "type": "string" }, - "_global.search._types:FieldCollapse": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types:Field" - }, - "inner_hits": { - "description": "The number of inner hits and their sort order", - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types:InnerHits" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_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": { - "$ref": "#/components/schemas/_global.search._types:FieldCollapse" - } - }, - "required": [ - "field" - ] - }, "_types.query_dsl:FieldAndFormat": { "type": "object", "properties": { @@ -30572,6 +30506,13 @@ "median" ] }, + "_types:GeoDistanceType": { + "type": "string", + "enum": [ + "arc", + "plane" + ] + }, "_types:DistanceUnit": { "type": "string", "enum": [ @@ -30659,46 +30600,809 @@ } } }, - "_types.query_dsl:ChildScoreMode": { - "type": "string", - "enum": [ - "none", - "avg", - "sum", - "max", - "min" - ] - }, - "_types:RelationName": { - "type": "string" - }, - "_types.query_dsl:HasParentQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + "_types:KnnSearch": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types:Field" }, - { - "type": "object", - "properties": { - "ignore_unmapped": { - "description": "Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.\nYou can use this parameter to query multiple indices that may not contain the `parent_type`.", - "type": "boolean" - }, - "inner_hits": { - "$ref": "#/components/schemas/_global.search._types:InnerHits" - }, - "parent_type": { - "$ref": "#/components/schemas/_types:RelationName" - }, - "query": { + "query_vector": { + "$ref": "#/components/schemas/_types:QueryVector" + }, + "query_vector_builder": { + "$ref": "#/components/schemas/_types:QueryVectorBuilder" + }, + "k": { + "description": "The final number of nearest neighbors to return as top hits", + "type": "number" + }, + "num_candidates": { + "description": "The number of nearest neighbor candidates to consider per shard", + "type": "number" + }, + "boost": { + "description": "Boost value to apply to kNN scores", + "type": "number" + }, + "filter": { + "description": "Filters for the kNN search query", + "oneOf": [ + { "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" }, - "score": { - "description": "Indicates whether the relevance score of a matching parent document is aggregated into its child documents.", - "type": "boolean" - } - }, - "required": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + } + } + ] + }, + "similarity": { + "description": "The minimum similarity for a vector to be considered a match", + "type": "number" + }, + "inner_hits": { + "$ref": "#/components/schemas/_global.search._types:InnerHits" + }, + "rescore_vector": { + "$ref": "#/components/schemas/_types:RescoreVector" + } + }, + "required": [ + "field" + ] + }, + "_types:QueryVector": { + "type": "array", + "items": { + "type": "number" + } + }, + "_types:QueryVectorBuilder": { + "type": "object", + "properties": { + "text_embedding": { + "$ref": "#/components/schemas/_types:TextEmbedding" + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types:TextEmbedding": { + "type": "object", + "properties": { + "model_id": { + "type": "string" + }, + "model_text": { + "type": "string" + } + }, + "required": [ + "model_id", + "model_text" + ] + }, + "_types:RescoreVector": { + "type": "object", + "properties": { + "oversample": { + "description": "Applies the specified oversample factor to k on the approximate kNN search", + "type": "number" + } + }, + "required": [ + "oversample" + ] + }, + "_global.search._types:Rescore": { + "allOf": [ + { + "type": "object", + "properties": { + "window_size": { + "type": "number" + } + } + }, + { + "type": "object", + "properties": { + "query": { + "$ref": "#/components/schemas/_global.search._types:RescoreQuery" + }, + "learning_to_rank": { + "$ref": "#/components/schemas/_global.search._types:LearningToRank" + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_global.search._types:RescoreQuery": { + "type": "object", + "properties": { + "rescore_query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "query_weight": { + "description": "Relative importance of the original query versus the rescore query.", + "type": "number" + }, + "rescore_query_weight": { + "description": "Relative importance of the rescore query versus the original query.", + "type": "number" + }, + "score_mode": { + "$ref": "#/components/schemas/_global.search._types:ScoreMode" + } + }, + "required": [ + "rescore_query" + ] + }, + "_global.search._types:ScoreMode": { + "type": "string", + "enum": [ + "avg", + "max", + "min", + "multiply", + "total" + ] + }, + "_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" + ] + }, + "_types:RetrieverContainer": { + "type": "object", + "properties": { + "standard": { + "$ref": "#/components/schemas/_types:StandardRetriever" + }, + "knn": { + "$ref": "#/components/schemas/_types:KnnRetriever" + }, + "rrf": { + "$ref": "#/components/schemas/_types:RRFRetriever" + }, + "text_similarity_reranker": { + "$ref": "#/components/schemas/_types:TextSimilarityReranker" + }, + "rule": { + "$ref": "#/components/schemas/_types:RuleRetriever" + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types:StandardRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "search_after": { + "$ref": "#/components/schemas/_types:SortResults" + }, + "terminate_after": { + "description": "Maximum number of documents to collect for each shard.", + "type": "number" + }, + "sort": { + "$ref": "#/components/schemas/_types:Sort" + }, + "collapse": { + "$ref": "#/components/schemas/_global.search._types:FieldCollapse" + } + } + } + ] + }, + "_types:RetrieverBase": { + "type": "object", + "properties": { + "filter": { + "description": "Query to filter the documents that can match.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + } + } + ] + }, + "min_score": { + "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", + "type": "number" + } + } + }, + "_types:KnnRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "field": { + "description": "The name of the vector field to search against.", + "type": "string" + }, + "query_vector": { + "$ref": "#/components/schemas/_types:QueryVector" + }, + "query_vector_builder": { + "$ref": "#/components/schemas/_types:QueryVectorBuilder" + }, + "k": { + "description": "Number of nearest neighbors to return as top hits.", + "type": "number" + }, + "num_candidates": { + "description": "Number of nearest neighbor candidates to consider per shard.", + "type": "number" + }, + "similarity": { + "description": "The minimum similarity required for a document to be considered a match.", + "type": "number" + }, + "rescore_vector": { + "$ref": "#/components/schemas/_types:RescoreVector" + } + }, + "required": [ + "field", + "k", + "num_candidates" + ] + } + ] + }, + "_types:RRFRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "retrievers": { + "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + } + }, + "rank_constant": { + "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", + "type": "number" + }, + "rank_window_size": { + "description": "This value determines the size of the individual result sets per query.", + "type": "number" + } + }, + "required": [ + "retrievers" + ] + } + ] + }, + "_types:TextSimilarityReranker": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + }, + "rank_window_size": { + "description": "This value determines how many documents we will consider from the nested retriever.", + "type": "number" + }, + "inference_id": { + "description": "Unique identifier of the inference endpoint created using the inference API.", + "type": "string" + }, + "inference_text": { + "description": "The text snippet used as the basis for similarity comparison", + "type": "string" + }, + "field": { + "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", + "type": "string" + } + }, + "required": [ + "retriever" + ] + } + ] + }, + "_types:RuleRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:RetrieverBase" + }, + { + "type": "object", + "properties": { + "ruleset_ids": { + "description": "The ruleset IDs containing the rules this retriever is evaluating against.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:Id" + } + }, + "match_criteria": { + "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", + "type": "object" + }, + "retriever": { + "$ref": "#/components/schemas/_types:RetrieverContainer" + }, + "rank_window_size": { + "description": "This value determines the size of the individual result set.", + "type": "number" + } + }, + "required": [ + "ruleset_ids", + "match_criteria", + "retriever" + ] + } + ] + }, + "_types:SlicedScroll": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types:Field" + }, + "id": { + "$ref": "#/components/schemas/_types:Id" + }, + "max": { + "type": "number" + } + }, + "required": [ + "id", + "max" + ] + }, + "_global.search._types:Suggester": { + "type": "object", + "properties": { + "text": { + "description": "Global suggest text, to avoid repetition when the same text is used in several suggesters", + "type": "string" + } + } + }, + "_global.search._types:PointInTimeReference": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/_types:Id" + }, + "keep_alive": { + "$ref": "#/components/schemas/_types:Duration" + } + }, + "required": [ + "id" + ] + }, + "_types.mapping:RuntimeFields": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping:RuntimeField" + } + }, + "_types.mapping:RuntimeField": { + "type": "object", + "properties": { + "fields": { + "description": "For type `composite`", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping:CompositeSubField" + } + }, + "fetch_fields": { + "description": "For type `lookup`", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFieldFetchFields" + } + }, + "format": { + "description": "A custom format for `date` type runtime fields.", + "type": "string" + }, + "input_field": { + "$ref": "#/components/schemas/_types:Field" + }, + "target_field": { + "$ref": "#/components/schemas/_types:Field" + }, + "target_index": { + "$ref": "#/components/schemas/_types:IndexName" + }, + "script": { + "$ref": "#/components/schemas/_types:Script" + }, + "type": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFieldType" + } + }, + "required": [ + "type" + ] + }, + "_types.mapping:CompositeSubField": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFieldType" + } + }, + "required": [ + "type" + ] + }, + "_types.mapping:RuntimeFieldType": { + "type": "string", + "enum": [ + "boolean", + "composite", + "date", + "double", + "geo_point", + "geo_shape", + "ip", + "keyword", + "long", + "lookup" + ] + }, + "_types.mapping:RuntimeFieldFetchFields": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types:Field" + }, + "format": { + "type": "string" + } + }, + "required": [ + "field" + ] + }, + "_types:ScriptLanguage": { + "anyOf": [ + { + "type": "string", + "enum": [ + "painless", + "expression", + "mustache", + "java" + ] + }, + { + "type": "string" + } + ] + }, + "_types.query_dsl:FunctionScoreMode": { + "type": "string", + "enum": [ + "multiply", + "sum", + "avg", + "first", + "max", + "min" + ] + }, + "_types.query_dsl:FuzzyQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "max_expansions": { + "description": "Maximum number of variations created.", + "type": "number" + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged when creating expansions.", + "type": "number" + }, + "rewrite": { + "$ref": "#/components/schemas/_types:MultiTermQueryRewrite" + }, + "transpositions": { + "description": "Indicates whether edits include transpositions of two adjacent characters (for example `ab` to `ba`).", + "type": "boolean" + }, + "fuzziness": { + "$ref": "#/components/schemas/_types:Fuzziness" + }, + "value": { + "description": "Term you wish to find in the provided field.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + "required": [ + "value" + ] + } + ] + }, + "_types:MultiTermQueryRewrite": { + "type": "string" + }, + "_types:Fuzziness": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "_types.query_dsl:GeoBoundingBoxQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/_types.query_dsl:GeoExecution" + }, + "validation_method": { + "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" + }, + "ignore_unmapped": { + "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "type": "boolean" + } + } + } + ] + }, + "_types.query_dsl:GeoExecution": { + "type": "string", + "enum": [ + "memory", + "indexed" + ] + }, + "_types.query_dsl:GeoValidationMethod": { + "type": "string", + "enum": [ + "coerce", + "ignore_malformed", + "strict" + ] + }, + "_types.query_dsl:GeoDistanceQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "distance": { + "$ref": "#/components/schemas/_types:Distance" + }, + "distance_type": { + "$ref": "#/components/schemas/_types:GeoDistanceType" + }, + "validation_method": { + "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" + }, + "ignore_unmapped": { + "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "type": "boolean" + } + }, + "required": [ + "distance" + ] + } + ] + }, + "_types.query_dsl:GeoGridQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "geogrid": { + "$ref": "#/components/schemas/_types:GeoTile" + }, + "geohash": { + "$ref": "#/components/schemas/_types:GeoHash" + }, + "geohex": { + "$ref": "#/components/schemas/_types:GeoHexCell" + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_types.query_dsl:GeoPolygonQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "validation_method": { + "$ref": "#/components/schemas/_types.query_dsl:GeoValidationMethod" + }, + "ignore_unmapped": { + "type": "boolean" + } + } + } + ] + }, + "_types.query_dsl:GeoShapeQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Set to `true` to ignore an unmapped field and not match any documents for this query.\nSet to `false` to throw an exception if the field is not mapped.", + "type": "boolean" + } + } + } + ] + }, + "_types.query_dsl:HasChildQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", + "type": "boolean" + }, + "inner_hits": { + "$ref": "#/components/schemas/_global.search._types:InnerHits" + }, + "max_children": { + "description": "Maximum number of child documents that match the query allowed for a returned parent document.\nIf the parent document exceeds this limit, it is excluded from the search results.", + "type": "number" + }, + "min_children": { + "description": "Minimum number of child documents that match the query required to match the query for a returned parent document.\nIf the parent document does not meet this limit, it is excluded from the search results.", + "type": "number" + }, + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "score_mode": { + "$ref": "#/components/schemas/_types.query_dsl:ChildScoreMode" + }, + "type": { + "$ref": "#/components/schemas/_types:RelationName" + } + }, + "required": [ + "query", + "type" + ] + } + ] + }, + "_types.query_dsl:ChildScoreMode": { + "type": "string", + "enum": [ + "none", + "avg", + "sum", + "max", + "min" + ] + }, + "_types:RelationName": { + "type": "string" + }, + "_types.query_dsl:HasParentQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.\nYou can use this parameter to query multiple indices that may not contain the `parent_type`.", + "type": "boolean" + }, + "inner_hits": { + "$ref": "#/components/schemas/_global.search._types:InnerHits" + }, + "parent_type": { + "$ref": "#/components/schemas/_types:RelationName" + }, + "query": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "score": { + "description": "Indicates whether the relevance score of a matching parent document is aggregated into its child documents.", + "type": "boolean" + } + }, + "required": [ "parent_type", "query" ] @@ -31022,49 +31726,6 @@ } ] }, - "_types:QueryVector": { - "type": "array", - "items": { - "type": "number" - } - }, - "_types:QueryVectorBuilder": { - "type": "object", - "properties": { - "text_embedding": { - "$ref": "#/components/schemas/_types:TextEmbedding" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types:TextEmbedding": { - "type": "object", - "properties": { - "model_id": { - "type": "string" - }, - "model_text": { - "type": "string" - } - }, - "required": [ - "model_id", - "model_text" - ] - }, - "_types:RescoreVector": { - "type": "object", - "properties": { - "oversample": { - "description": "Applies the specified oversample factor to k on the approximate kNN search", - "type": "number" - } - }, - "required": [ - "oversample" - ] - }, "_types.query_dsl:MatchQuery": { "allOf": [ { @@ -35941,263 +36602,6 @@ } } }, - "_types:KnnSearch": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types:Field" - }, - "query_vector": { - "$ref": "#/components/schemas/_types:QueryVector" - }, - "query_vector_builder": { - "$ref": "#/components/schemas/_types:QueryVectorBuilder" - }, - "k": { - "description": "The final number of nearest neighbors to return as top hits", - "type": "number" - }, - "num_candidates": { - "description": "The number of nearest neighbor candidates to consider per shard", - "type": "number" - }, - "boost": { - "description": "Boost value to apply to kNN scores", - "type": "number" - }, - "filter": { - "description": "Filters for the kNN search query", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - } - } - ] - }, - "similarity": { - "description": "The minimum similarity for a vector to be considered a match", - "type": "number" - }, - "inner_hits": { - "$ref": "#/components/schemas/_global.search._types:InnerHits" - }, - "rescore_vector": { - "$ref": "#/components/schemas/_types:RescoreVector" - } - }, - "required": [ - "field" - ] - }, - "_global.search._types:Rescore": { - "allOf": [ - { - "type": "object", - "properties": { - "window_size": { - "type": "number" - } - } - }, - { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_global.search._types:RescoreQuery" - }, - "learning_to_rank": { - "$ref": "#/components/schemas/_global.search._types:LearningToRank" - } - }, - "minProperties": 1, - "maxProperties": 1 - } - ] - }, - "_global.search._types:RescoreQuery": { - "type": "object", - "properties": { - "rescore_query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "query_weight": { - "description": "Relative importance of the original query versus the rescore query.", - "type": "number" - }, - "rescore_query_weight": { - "description": "Relative importance of the rescore query versus the original query.", - "type": "number" - }, - "score_mode": { - "$ref": "#/components/schemas/_global.search._types:ScoreMode" - } - }, - "required": [ - "rescore_query" - ] - }, - "_global.search._types:ScoreMode": { - "type": "string", - "enum": [ - "avg", - "max", - "min", - "multiply", - "total" - ] - }, - "_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" - ] - }, - "_types:SlicedScroll": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types:Field" - }, - "id": { - "$ref": "#/components/schemas/_types:Id" - }, - "max": { - "type": "number" - } - }, - "required": [ - "id", - "max" - ] - }, - "_global.search._types:Suggester": { - "type": "object", - "properties": { - "text": { - "description": "Global suggest text, to avoid repetition when the same text is used in several suggesters", - "type": "string" - } - } - }, - "_global.search._types:PointInTimeReference": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types:Id" - }, - "keep_alive": { - "$ref": "#/components/schemas/_types:Duration" - } - }, - "required": [ - "id" - ] - }, - "_types.mapping:RuntimeFields": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping:RuntimeField" - } - }, - "_types.mapping:RuntimeField": { - "type": "object", - "properties": { - "fields": { - "description": "For type `composite`", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.mapping:CompositeSubField" - } - }, - "fetch_fields": { - "description": "For type `lookup`", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.mapping:RuntimeFieldFetchFields" - } - }, - "format": { - "description": "A custom format for `date` type runtime fields.", - "type": "string" - }, - "input_field": { - "$ref": "#/components/schemas/_types:Field" - }, - "target_field": { - "$ref": "#/components/schemas/_types:Field" - }, - "target_index": { - "$ref": "#/components/schemas/_types:IndexName" - }, - "script": { - "$ref": "#/components/schemas/_types:Script" - }, - "type": { - "$ref": "#/components/schemas/_types.mapping:RuntimeFieldType" - } - }, - "required": [ - "type" - ] - }, - "_types.mapping:CompositeSubField": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/_types.mapping:RuntimeFieldType" - } - }, - "required": [ - "type" - ] - }, - "_types.mapping:RuntimeFieldType": { - "type": "string", - "enum": [ - "boolean", - "composite", - "date", - "double", - "geo_point", - "geo_shape", - "ip", - "keyword", - "long", - "lookup" - ] - }, - "_types.mapping:RuntimeFieldFetchFields": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types:Field" - }, - "format": { - "type": "string" - } - }, - "required": [ - "field" - ] - }, "_types:Refresh": { "type": "string", "enum": [ @@ -48098,411 +48502,6 @@ "source" ] }, - "_types:ScriptSource": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_global.search._types:SearchRequestBody" - } - ] - }, - "_global.search._types:SearchRequestBody": { - "type": "object", - "properties": { - "aggregations": { - "description": "Defines the aggregations that are run as part of the search request.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.aggregations:AggregationContainer" - } - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types:FieldCollapse" - }, - "explain": { - "description": "If `true`, the request returns detailed information about score computation as part of a hit.", - "type": "boolean" - }, - "ext": { - "description": "Configuration of search extensions defined by Elasticsearch plugins.", - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "from": { - "description": "The starting document offset, which must be non-negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` parameter.", - "type": "number" - }, - "highlight": { - "$ref": "#/components/schemas/_global.search._types:Highlight" - }, - "track_total_hits": { - "$ref": "#/components/schemas/_global.search._types:TrackHits" - }, - "indices_boost": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html#relevance-scores" - }, - "description": "Boost the `_score` of documents from specified indices.\nThe boost value is the factor by which scores are multiplied.\nA boost value greater than `1.0` increases the score.\nA boost value between `0` and `1.0` decreases the score.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "number" - }, - "minProperties": 1, - "maxProperties": 1 - } - }, - "docvalue_fields": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#docvalue-fields" - }, - "description": "An array of wildcard (`*`) field patterns.\nThe request returns doc values for field names matching these patterns in the `hits.fields` property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" - } - }, - "knn": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#approximate-knn" - }, - "description": "The approximate kNN search to run.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types:KnnSearch" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:KnnSearch" - } - } - ] - }, - "min_score": { - "description": "The minimum `_score` for matching documents.\nDocuments with a lower `_score` are not included in the search results.", - "type": "number" - }, - "post_filter": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "profile": { - "description": "Set to `true` to return detailed timing information about the execution of individual components in a search request.\nNOTE: This is a debugging tool and adds significant overhead to search execution.", - "type": "boolean" - }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "rescore": { - "description": "Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.", - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types:Rescore" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types:Rescore" - } - } - ] - }, - "retriever": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - }, - "script_fields": { - "description": "Retrieve a script evaluation (based on different fields) for each hit.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types:ScriptField" - } - }, - "search_after": { - "$ref": "#/components/schemas/_types:SortResults" - }, - "size": { - "description": "The number of hits to return, which must not be negative.\nBy default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.\nTo page through more hits, use the `search_after` property.", - "type": "number" - }, - "slice": { - "$ref": "#/components/schemas/_types:SlicedScroll" - }, - "sort": { - "$ref": "#/components/schemas/_types:Sort" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types:SourceConfig" - }, - "fields": { - "description": "An array of wildcard (`*`) field patterns.\nThe request returns values for field names matching these patterns in the `hits.fields` property of the response.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:FieldAndFormat" - } - }, - "suggest": { - "$ref": "#/components/schemas/_global.search._types:Suggester" - }, - "terminate_after": { - "description": "The maximum number of documents to collect for each shard.\nIf a query reaches this limit, Elasticsearch terminates the query early.\nElasticsearch collects documents before sorting.\n\nIMPORTANT: Use with caution.\nElasticsearch applies this property to each shard handling the request.\nWhen possible, let Elasticsearch perform early termination automatically.\nAvoid specifying this property for requests that target data streams with backing indices across multiple data tiers.\n\nIf set to `0` (default), the query does not terminate early.", - "type": "number" - }, - "timeout": { - "description": "The period of time to wait for a response from each shard.\nIf no response is received before the timeout expires, the request fails and returns an error.\nDefaults to no timeout.", - "type": "string" - }, - "track_scores": { - "description": "If `true`, calculate and return document scores, even if the scores are not used for sorting.", - "type": "boolean" - }, - "version": { - "description": "If `true`, the request returns the document version as part of a hit.", - "type": "boolean" - }, - "seq_no_primary_term": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html" - }, - "description": "If `true`, the request returns sequence number and primary term of the last modification of each hit.", - "type": "boolean" - }, - "stored_fields": { - "$ref": "#/components/schemas/_types:Fields" - }, - "pit": { - "$ref": "#/components/schemas/_global.search._types:PointInTimeReference" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping:RuntimeFields" - }, - "stats": { - "description": "The stats groups to associate with the search.\nEach group maintains a statistics aggregation for its associated searches.\nYou can retrieve these stats using the indices stats API.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "_types:RetrieverContainer": { - "type": "object", - "properties": { - "standard": { - "$ref": "#/components/schemas/_types:StandardRetriever" - }, - "knn": { - "$ref": "#/components/schemas/_types:KnnRetriever" - }, - "rrf": { - "$ref": "#/components/schemas/_types:RRFRetriever" - }, - "text_similarity_reranker": { - "$ref": "#/components/schemas/_types:TextSimilarityReranker" - }, - "rule": { - "$ref": "#/components/schemas/_types:RuleRetriever" - } - }, - "minProperties": 1, - "maxProperties": 1 - }, - "_types:StandardRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "search_after": { - "$ref": "#/components/schemas/_types:SortResults" - }, - "terminate_after": { - "description": "Maximum number of documents to collect for each shard.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types:Sort" - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types:FieldCollapse" - } - } - } - ] - }, - "_types:RetrieverBase": { - "type": "object", - "properties": { - "filter": { - "description": "Query to filter the documents that can match.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - } - } - ] - }, - "min_score": { - "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", - "type": "number" - } - } - }, - "_types:KnnRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "field": { - "description": "The name of the vector field to search against.", - "type": "string" - }, - "query_vector": { - "$ref": "#/components/schemas/_types:QueryVector" - }, - "query_vector_builder": { - "$ref": "#/components/schemas/_types:QueryVectorBuilder" - }, - "k": { - "description": "Number of nearest neighbors to return as top hits.", - "type": "number" - }, - "num_candidates": { - "description": "Number of nearest neighbor candidates to consider per shard.", - "type": "number" - }, - "similarity": { - "description": "The minimum similarity required for a document to be considered a match.", - "type": "number" - }, - "rescore_vector": { - "$ref": "#/components/schemas/_types:RescoreVector" - } - }, - "required": [ - "field", - "k", - "num_candidates" - ] - } - ] - }, - "_types:RRFRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "retrievers": { - "description": "A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - } - }, - "rank_constant": { - "description": "This value determines how much influence documents in individual result sets per query have over the final ranked result set.", - "type": "number" - }, - "rank_window_size": { - "description": "This value determines the size of the individual result sets per query.", - "type": "number" - } - }, - "required": [ - "retrievers" - ] - } - ] - }, - "_types:TextSimilarityReranker": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "retriever": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - }, - "rank_window_size": { - "description": "This value determines how many documents we will consider from the nested retriever.", - "type": "number" - }, - "inference_id": { - "description": "Unique identifier of the inference endpoint created using the inference API.", - "type": "string" - }, - "inference_text": { - "description": "The text snippet used as the basis for similarity comparison", - "type": "string" - }, - "field": { - "description": "The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text", - "type": "string" - } - }, - "required": [ - "retriever" - ] - } - ] - }, - "_types:RuleRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:RetrieverBase" - }, - { - "type": "object", - "properties": { - "ruleset_ids": { - "description": "The ruleset IDs containing the rules this retriever is evaluating against.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:Id" - } - }, - "match_criteria": { - "description": "The match criteria that will determine if a rule in the provided rulesets should be applied.", - "type": "object" - }, - "retriever": { - "$ref": "#/components/schemas/_types:RetrieverContainer" - }, - "rank_window_size": { - "description": "This value determines the size of the individual result set.", - "type": "number" - } - }, - "required": [ - "ruleset_ids", - "match_criteria", - "retriever" - ] - } - ] - }, "graph._types:Hop": { "type": "object", "properties": { @@ -52628,8 +52627,7 @@ "$ref": "#/components/schemas/_types:Id" }, "lang": { - "description": "Script language.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptLanguage" }, "params": { "description": "Object containing parameters for the script.", @@ -52639,8 +52637,7 @@ } }, "source": { - "description": "Inline script.\nIf no `id` is specified, this parameter is required.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } } } @@ -57954,8 +57951,7 @@ "type": "boolean" }, "source": { - "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } } }, @@ -69177,8 +69173,7 @@ } }, "source": { - "description": "An inline search template.\nIt supports the same parameters as the search API's request body.\nThese parameters also support Mustache variables.\nIf no `id` or `` is specified, this parameter is required.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } } }, @@ -69576,8 +69571,7 @@ "type": "boolean" }, "source": { - "description": "An inline search template. Supports the same parameters as the search API's\nrequest body. It also supports Mustache variables. If no `id` is specified, this\nparameter is required.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } } }, diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 07facc20ba..4326d772eb 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -41705,8 +41705,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } @@ -41745,7 +41745,7 @@ } ], "query": [], - "specLocation": "_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L76" + "specLocation": "_global/render_search_template/RenderSearchTemplateRequest.ts#L26-L77" }, { "body": { @@ -44340,8 +44340,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } @@ -44555,7 +44555,7 @@ } } ], - "specLocation": "_global/search_template/SearchTemplateRequest.ts#L32-L153" + "specLocation": "_global/search_template/SearchTemplateRequest.ts#L33-L154" }, { "body": { @@ -57209,8 +57209,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } }, @@ -57284,6 +57284,37 @@ "shortcutProperty": "source", "specLocation": "_types/Scripting.ts#L65-L89" }, + { + "codegenNames": [ + "script_string", + "script_template" + ], + "kind": "type_alias", + "name": { + "name": "ScriptSource", + "namespace": "_types" + }, + "specLocation": "_types/Scripting.ts#L48-L49", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "SearchRequestBody", + "namespace": "_global.search._types" + } + } + ], + "kind": "union_of" + } + }, { "isOpen": true, "kind": "enum", @@ -74335,7 +74366,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L101-L107" + "specLocation": "_global/search/_types/suggester.ts#L102-L108" }, { "kind": "interface", @@ -74420,7 +74451,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L109-L142", + "specLocation": "_global/search/_types/suggester.ts#L110-L143", "variants": { "kind": "container", "nonExhaustive": true @@ -74515,7 +74546,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L163-L181" + "specLocation": "_global/search/_types/suggester.ts#L164-L182" }, { "kind": "interface", @@ -74561,7 +74592,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L144-L159" + "specLocation": "_global/search/_types/suggester.ts#L145-L160" }, { "kind": "interface", @@ -74637,7 +74668,7 @@ } ], "shortcutProperty": "context", - "specLocation": "_global/search/_types/suggester.ts#L235-L264" + "specLocation": "_global/search/_types/suggester.ts#L236-L265" }, { "codegenNames": [ @@ -74652,7 +74683,7 @@ "name": "Context", "namespace": "_global.search._types" }, - "specLocation": "_global/search/_types/suggester.ts#L228-L233", + "specLocation": "_global/search/_types/suggester.ts#L229-L234", "type": { "items": [ { @@ -74748,7 +74779,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L196-L224" + "specLocation": "_global/search/_types/suggester.ts#L197-L225" }, { "kind": "interface", @@ -74797,7 +74828,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L183-L194" + "specLocation": "_global/search/_types/suggester.ts#L184-L195" }, { "inherits": { @@ -74974,7 +75005,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L359-L417" + "specLocation": "_global/search/_types/suggester.ts#L360-L418" }, { "kind": "interface", @@ -75027,7 +75058,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L333-L346" + "specLocation": "_global/search/_types/suggester.ts#L334-L347" }, { "kind": "interface", @@ -75055,13 +75086,13 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } ], - "specLocation": "_global/search/_types/suggester.ts#L348-L357" + "specLocation": "_global/search/_types/suggester.ts#L349-L358" }, { "kind": "interface", @@ -75210,7 +75241,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L268-L331" + "specLocation": "_global/search/_types/suggester.ts#L269-L332" }, { "kind": "enum", @@ -75266,7 +75297,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L419-L428" + "specLocation": "_global/search/_types/suggester.ts#L420-L429" }, { "kind": "interface", @@ -75312,7 +75343,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L445-L461", + "specLocation": "_global/search/_types/suggester.ts#L446-L462", "variants": { "kind": "container" } @@ -75337,7 +75368,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L430-L435" + "specLocation": "_global/search/_types/suggester.ts#L431-L436" }, { "kind": "interface", @@ -75380,7 +75411,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L437-L441" + "specLocation": "_global/search/_types/suggester.ts#L438-L442" }, { "kind": "interface", @@ -75402,7 +75433,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L463-L468" + "specLocation": "_global/search/_types/suggester.ts#L464-L469" }, { "inherits": { @@ -75568,7 +75599,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L506-L568" + "specLocation": "_global/search/_types/suggester.ts#L507-L569" }, { "kind": "enum", @@ -75586,7 +75617,7 @@ "name": "SuggestSort", "namespace": "_global.search._types" }, - "specLocation": "_global/search/_types/suggester.ts#L495-L504" + "specLocation": "_global/search/_types/suggester.ts#L496-L505" }, { "kind": "enum", @@ -75616,7 +75647,7 @@ "name": "StringDistance", "namespace": "_global.search._types" }, - "specLocation": "_global/search/_types/suggester.ts#L472-L493" + "specLocation": "_global/search/_types/suggester.ts#L473-L494" }, { "kind": "interface", @@ -83508,7 +83539,7 @@ "name": "Suggest", "namespace": "_global.search._types" }, - "specLocation": "_global/search/_types/suggester.ts#L34-L40", + "specLocation": "_global/search/_types/suggester.ts#L35-L41", "type": { "items": [ { @@ -83612,7 +83643,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L48-L55", + "specLocation": "_global/search/_types/suggester.ts#L49-L56", "variantName": "completion" }, { @@ -83656,7 +83687,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L42-L46" + "specLocation": "_global/search/_types/suggester.ts#L43-L47" }, { "generics": [ @@ -83803,7 +83834,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L73-L84" + "specLocation": "_global/search/_types/suggester.ts#L74-L85" }, { "inherits": { @@ -83845,7 +83876,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L57-L62", + "specLocation": "_global/search/_types/suggester.ts#L58-L63", "variantName": "phrase" }, { @@ -83900,7 +83931,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L86-L91" + "specLocation": "_global/search/_types/suggester.ts#L87-L92" }, { "inherits": { @@ -83942,7 +83973,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L64-L69", + "specLocation": "_global/search/_types/suggester.ts#L65-L70", "variantName": "term" }, { @@ -84008,7 +84039,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L93-L99" + "specLocation": "_global/search/_types/suggester.ts#L94-L100" }, { "description": "The response returned by Elasticsearch when request execution did not succeed.", @@ -84053,7 +84084,7 @@ "name": "RequestItem", "namespace": "_global.msearch_template" }, - "specLocation": "_global/msearch_template/types.ts#L25-L26", + "specLocation": "_global/msearch_template/types.ts#L26-L27", "type": { "items": [ { @@ -84145,13 +84176,13 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } ], - "specLocation": "_global/msearch_template/types.ts#L28-L54" + "specLocation": "_global/msearch_template/types.ts#L29-L55" }, { "kind": "enum", @@ -85350,37 +85381,6 @@ "kind": "union_of" } }, - { - "codegenNames": [ - "script_string", - "script_template" - ], - "kind": "type_alias", - "name": { - "name": "ScriptSource", - "namespace": "_types" - }, - "specLocation": "_types/Scripting.ts#L48-L49", - "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "SearchRequestBody", - "namespace": "_global.search._types" - } - } - ], - "kind": "union_of" - } - }, { "kind": "type_alias", "name": { @@ -107912,7 +107912,7 @@ "name": "ConditionOp", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L41-L48" + "specLocation": "watcher/_types/Conditions.ts#L42-L49" }, { "kind": "enum", @@ -107937,7 +107937,7 @@ "name": "ConditionType", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L64-L70" + "specLocation": "watcher/_types/Conditions.ts#L65-L71" }, { "kind": "enum", @@ -108251,7 +108251,7 @@ "name": "Quantifier", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L74-L77" + "specLocation": "watcher/_types/Conditions.ts#L75-L78" }, { "kind": "enum", @@ -121305,7 +121305,7 @@ }, "properties": [ { - "description": "The language the script is written in.\nFor serach templates, use `mustache`.", + "description": "The language the script is written in.\nFor search templates, use `mustache`.", "name": "lang", "required": true, "type": { @@ -130430,8 +130430,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptLanguage", + "namespace": "_types" } } }, @@ -130461,8 +130461,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index e9862de960..6e09559ab0 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -31807,7 +31807,7 @@ "name": "RequestItem", "namespace": "_global.msearch_template" }, - "specLocation": "_global/msearch_template/types.ts#L25-L26", + "specLocation": "_global/msearch_template/types.ts#L26-L27", "type": { "kind": "union_of", "items": [ @@ -31933,13 +31933,13 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } ], - "specLocation": "_global/msearch_template/types.ts#L28-L54" + "specLocation": "_global/msearch_template/types.ts#L29-L55" }, { "kind": "interface", @@ -34880,8 +34880,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } @@ -34919,7 +34919,7 @@ } ], "query": [], - "specLocation": "_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L76" + "specLocation": "_global/render_search_template/RenderSearchTemplateRequest.ts#L26-L77" }, { "kind": "response", @@ -37600,7 +37600,7 @@ } ], "shortcutProperty": "context", - "specLocation": "_global/search/_types/suggester.ts#L235-L264" + "specLocation": "_global/search/_types/suggester.ts#L236-L265" }, { "kind": "interface", @@ -37666,7 +37666,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L48-L55", + "specLocation": "_global/search/_types/suggester.ts#L49-L56", "variantName": "completion" }, { @@ -37814,7 +37814,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L73-L84" + "specLocation": "_global/search/_types/suggester.ts#L74-L85" }, { "kind": "interface", @@ -37905,7 +37905,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L163-L181" + "specLocation": "_global/search/_types/suggester.ts#L164-L182" }, { "kind": "type_alias", @@ -37920,7 +37920,7 @@ "name": "Context", "namespace": "_global.search._types" }, - "specLocation": "_global/search/_types/suggester.ts#L228-L233", + "specLocation": "_global/search/_types/suggester.ts#L229-L234", "type": { "kind": "union_of", "items": [ @@ -38387,7 +38387,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L268-L331" + "specLocation": "_global/search/_types/suggester.ts#L269-L332" }, { "kind": "interface", @@ -38767,7 +38767,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L109-L142", + "specLocation": "_global/search/_types/suggester.ts#L110-L143", "variants": { "kind": "container", "nonExhaustive": true @@ -40298,7 +40298,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L430-L435" + "specLocation": "_global/search/_types/suggester.ts#L431-L436" }, { "kind": "interface", @@ -40382,7 +40382,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L437-L441" + "specLocation": "_global/search/_types/suggester.ts#L438-L442" }, { "kind": "interface", @@ -40467,7 +40467,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L57-L62", + "specLocation": "_global/search/_types/suggester.ts#L58-L63", "variantName": "phrase" }, { @@ -40521,7 +40521,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L333-L346" + "specLocation": "_global/search/_types/suggester.ts#L334-L347" }, { "kind": "interface", @@ -40549,13 +40549,13 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } ], - "specLocation": "_global/search/_types/suggester.ts#L348-L357" + "specLocation": "_global/search/_types/suggester.ts#L349-L358" }, { "kind": "interface", @@ -40589,7 +40589,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L419-L428" + "specLocation": "_global/search/_types/suggester.ts#L420-L429" }, { "kind": "interface", @@ -40643,7 +40643,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L86-L91" + "specLocation": "_global/search/_types/suggester.ts#L87-L92" }, { "kind": "interface", @@ -40820,7 +40820,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L359-L417" + "specLocation": "_global/search/_types/suggester.ts#L360-L418" }, { "kind": "interface", @@ -41232,7 +41232,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L183-L194" + "specLocation": "_global/search/_types/suggester.ts#L184-L195" }, { "kind": "interface", @@ -42131,7 +42131,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L445-L461", + "specLocation": "_global/search/_types/suggester.ts#L446-L462", "variants": { "kind": "container" } @@ -42267,7 +42267,7 @@ "name": "StringDistance", "namespace": "_global.search._types" }, - "specLocation": "_global/search/_types/suggester.ts#L472-L493" + "specLocation": "_global/search/_types/suggester.ts#L473-L494" }, { "kind": "interface", @@ -42289,7 +42289,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L463-L468" + "specLocation": "_global/search/_types/suggester.ts#L464-L469" }, { "kind": "type_alias", @@ -42303,7 +42303,7 @@ "name": "Suggest", "namespace": "_global.search._types" }, - "specLocation": "_global/search/_types/suggester.ts#L34-L40", + "specLocation": "_global/search/_types/suggester.ts#L35-L41", "type": { "kind": "union_of", "items": [ @@ -42384,7 +42384,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L42-L46" + "specLocation": "_global/search/_types/suggester.ts#L43-L47" }, { "kind": "interface", @@ -42461,7 +42461,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L196-L224" + "specLocation": "_global/search/_types/suggester.ts#L197-L225" }, { "kind": "enum", @@ -42479,7 +42479,7 @@ "name": "SuggestSort", "namespace": "_global.search._types" }, - "specLocation": "_global/search/_types/suggester.ts#L495-L504" + "specLocation": "_global/search/_types/suggester.ts#L496-L505" }, { "kind": "interface", @@ -42532,7 +42532,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L101-L107" + "specLocation": "_global/search/_types/suggester.ts#L102-L108" }, { "kind": "interface", @@ -42578,7 +42578,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L144-L159" + "specLocation": "_global/search/_types/suggester.ts#L145-L160" }, { "kind": "interface", @@ -42620,7 +42620,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L64-L69", + "specLocation": "_global/search/_types/suggester.ts#L65-L70", "variantName": "term" }, { @@ -42686,7 +42686,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L93-L99" + "specLocation": "_global/search/_types/suggester.ts#L94-L100" }, { "kind": "interface", @@ -42852,7 +42852,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L506-L568" + "specLocation": "_global/search/_types/suggester.ts#L507-L569" }, { "kind": "interface", @@ -43843,8 +43843,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } @@ -44057,7 +44057,7 @@ } } ], - "specLocation": "_global/search_template/SearchTemplateRequest.ts#L32-L153" + "specLocation": "_global/search_template/SearchTemplateRequest.ts#L33-L154" }, { "kind": "response", @@ -52534,8 +52534,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } }, @@ -52826,8 +52826,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } }, @@ -52843,7 +52843,7 @@ } } ], - "specLocation": "_types/Transform.ts#L36-L44" + "specLocation": "_types/Transform.ts#L37-L45" }, { "kind": "type_alias", @@ -53175,7 +53175,7 @@ } } ], - "specLocation": "_types/Transform.ts#L46-L49" + "specLocation": "_types/Transform.ts#L47-L50" }, { "kind": "enum", @@ -54156,7 +54156,7 @@ }, "properties": [ { - "description": "The language the script is written in.\nFor serach templates, use `mustache`.", + "description": "The language the script is written in.\nFor search templates, use `mustache`.", "name": "lang", "required": true, "type": { @@ -54648,7 +54648,7 @@ } } ], - "specLocation": "_types/Transform.ts#L27-L34", + "specLocation": "_types/Transform.ts#L28-L35", "variants": { "kind": "container" } @@ -160614,8 +160614,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptLanguage", + "namespace": "_types" } } }, @@ -160645,8 +160645,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } @@ -233522,7 +233522,7 @@ "namespace": "watcher._types" }, "properties": [], - "specLocation": "watcher/_types/Conditions.ts#L25-L25" + "specLocation": "watcher/_types/Conditions.ts#L26-L26" }, { "kind": "interface", @@ -233574,7 +233574,7 @@ } } ], - "specLocation": "watcher/_types/Conditions.ts#L32-L39" + "specLocation": "watcher/_types/Conditions.ts#L33-L40" }, { "kind": "interface", @@ -233606,7 +233606,7 @@ } } ], - "specLocation": "watcher/_types/Conditions.ts#L27-L30" + "specLocation": "watcher/_types/Conditions.ts#L28-L31" }, { "kind": "interface", @@ -233739,7 +233739,7 @@ } } ], - "specLocation": "watcher/_types/Conditions.ts#L50-L62", + "specLocation": "watcher/_types/Conditions.ts#L51-L63", "variants": { "kind": "container" } @@ -233770,7 +233770,7 @@ "name": "ConditionOp", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L41-L48" + "specLocation": "watcher/_types/Conditions.ts#L42-L49" }, { "kind": "enum", @@ -233795,7 +233795,7 @@ "name": "ConditionType", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L64-L70" + "specLocation": "watcher/_types/Conditions.ts#L65-L71" }, { "kind": "enum", @@ -235589,7 +235589,7 @@ "namespace": "watcher._types" }, "properties": [], - "specLocation": "watcher/_types/Conditions.ts#L72-L72" + "specLocation": "watcher/_types/Conditions.ts#L73-L73" }, { "kind": "interface", @@ -235900,7 +235900,7 @@ "name": "Quantifier", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L74-L77" + "specLocation": "watcher/_types/Conditions.ts#L75-L78" }, { "kind": "interface", @@ -236277,8 +236277,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptLanguage", + "namespace": "_types" } } }, @@ -236306,8 +236306,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } }, @@ -236323,7 +236323,7 @@ } } ], - "specLocation": "watcher/_types/Conditions.ts#L79-L87" + "specLocation": "watcher/_types/Conditions.ts#L80-L88" }, { "kind": "interface", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index a9d4c513e8..d5752786eb 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -2,7 +2,8 @@ "endpointErrors": { "async_search.submit": { "request": [ - "interface definition _types:QueryVectorBuilder - Property text_embedding is a single-variant and must be required" + "interface definition _types:QueryVectorBuilder - Property text_embedding is a single-variant and must be required", + "interface definition _types:RankContainer - Property rrf is a single-variant and must be required" ], "response": [] }, @@ -44,12 +45,6 @@ ], "response": [] }, - "fleet.msearch": { - "request": [ - "interface definition _types:RankContainer - Property rrf is a single-variant and must be required" - ], - "response": [] - }, "get_source": { "request": [ "Request: query parameter 'stored_fields' does not exist in the json spec" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 95cf8719d4..942de34123 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -90,7 +90,7 @@ export interface BulkUpdateAction profile?: boolean - source?: string + source?: ScriptSource } export interface MtermvectorsOperation { @@ -1035,7 +1035,7 @@ export interface ReindexRequest extends RequestBase { conflicts?: Conflicts dest: ReindexDestination max_docs?: long - script?: Script | string + script?: Script | ScriptSource size?: long source: ReindexSource } @@ -1119,7 +1119,7 @@ export interface RenderSearchTemplateRequest extends RequestBase { id?: Id file?: string params?: Record - source?: string + source?: ScriptSource } } @@ -1139,7 +1139,7 @@ export interface ScriptsPainlessExecuteRequest extends RequestBase { body?: { context?: ScriptsPainlessExecutePainlessContext context_setup?: ScriptsPainlessExecutePainlessContextSetup - script?: Script | string + script?: Script | ScriptSource } } @@ -1630,7 +1630,7 @@ export interface SearchPhraseSuggestCollate { export interface SearchPhraseSuggestCollateQuery { id?: Id - source?: string + source?: ScriptSource } export interface SearchPhraseSuggestHighlight { @@ -1961,7 +1961,7 @@ export interface SearchTemplateRequest extends RequestBase { id?: Id params?: Record profile?: boolean - source?: string + source?: ScriptSource } } @@ -2096,7 +2096,7 @@ export interface UpdateRequest detect_noop?: boolean doc?: TPartialDocument doc_as_upsert?: boolean - script?: Script | string + script?: Script | ScriptSource scripted_upsert?: boolean _source?: SearchSourceConfig upsert?: TDocument @@ -2145,7 +2145,7 @@ export interface UpdateByQueryRequest extends RequestBase { body?: { max_docs?: long query?: QueryDslQueryContainer - script?: Script | string + script?: Script | ScriptSource slice?: SlicedScroll conflicts?: Conflicts } @@ -2775,7 +2775,7 @@ export interface ScoreSort { } export interface Script { - source?: string + source?: ScriptSource id?: Id params?: Record lang?: ScriptLanguage @@ -2783,7 +2783,7 @@ export interface Script { } export interface ScriptField { - script: Script | string + script: Script | ScriptSource ignore_failure?: boolean } @@ -2791,7 +2791,7 @@ export type ScriptLanguage = 'painless' | 'expression' | 'mustache' | 'java'| st export interface ScriptSort { order?: SortOrder - script: Script | string + script: Script | ScriptSource type?: ScriptSortType mode?: SortMode nested?: NestedSortValue @@ -2804,7 +2804,7 @@ export type ScriptSource = string | SearchSearchRequestBody export interface ScriptTransform { lang?: string params?: Record - source?: string + source?: ScriptSource id?: string } @@ -3203,7 +3203,7 @@ export interface AggregationsAutoDateHistogramAggregation extends AggregationsBu missing?: DateTime offset?: string params?: Record - script?: Script | string + script?: Script | ScriptSource time_zone?: TimeZone } @@ -3273,11 +3273,11 @@ export interface AggregationsBucketPathAggregation { } export interface AggregationsBucketScriptAggregation extends AggregationsPipelineAggregationBase { - script?: Script | string + script?: Script | ScriptSource } export interface AggregationsBucketSelectorAggregation extends AggregationsPipelineAggregationBase { - script?: Script | string + script?: Script | ScriptSource } export interface AggregationsBucketSortAggregation { @@ -3350,7 +3350,7 @@ export interface AggregationsCompositeAggregationBase { field?: Field missing_bucket?: boolean missing_order?: AggregationsMissingOrder - script?: Script | string + script?: Script | ScriptSource value_type?: AggregationsValueType order?: SortOrder } @@ -3421,7 +3421,7 @@ export interface AggregationsDateHistogramAggregation extends AggregationsBucket offset?: Duration order?: AggregationsAggregateOrder params?: Record - script?: Script | string + script?: Script | ScriptSource time_zone?: TimeZone keyed?: boolean } @@ -3462,7 +3462,7 @@ export interface AggregationsDerivativeAggregation extends AggregationsPipelineA export interface AggregationsDiversifiedSamplerAggregation extends AggregationsBucketAggregationBase { execution_hint?: AggregationsSamplerAggregationExecutionHint max_docs_per_value?: integer - script?: Script | string + script?: Script | ScriptSource shard_size?: integer field?: Field } @@ -3711,7 +3711,7 @@ export interface AggregationsHistogramAggregation extends AggregationsBucketAggr missing?: double offset?: double order?: AggregationsAggregateOrder - script?: Script | string + script?: Script | ScriptSource format?: string keyed?: boolean } @@ -3899,7 +3899,7 @@ export interface AggregationsMedianAbsoluteDeviationAggregation extends Aggregat export interface AggregationsMetricAggregationBase { field?: Field missing?: AggregationsMissing - script?: Script | string + script?: Script | ScriptSource } export interface AggregationsMinAggregate extends AggregationsSingleMetricAggregateBase { @@ -4060,7 +4060,7 @@ export interface AggregationsRangeAggregation extends AggregationsBucketAggregat field?: Field missing?: integer ranges?: AggregationsAggregationRange[] - script?: Script | string + script?: Script | ScriptSource keyed?: boolean format?: string } @@ -4118,7 +4118,7 @@ export interface AggregationsSamplerAggregation extends AggregationsBucketAggreg export type AggregationsSamplerAggregationExecutionHint = 'map' | 'global_ordinals' | 'bytes_hash' export interface AggregationsScriptedHeuristic { - script: Script | string + script: Script | ScriptSource } export interface AggregationsScriptedMetricAggregate extends AggregationsAggregateBase { @@ -4126,11 +4126,11 @@ export interface AggregationsScriptedMetricAggregate extends AggregationsAggrega } export interface AggregationsScriptedMetricAggregation extends AggregationsMetricAggregationBase { - combine_script?: Script | string - init_script?: Script | string - map_script?: Script | string + combine_script?: Script | ScriptSource + init_script?: Script | ScriptSource + map_script?: Script | ScriptSource params?: Record - reduce_script?: Script | string + reduce_script?: Script | ScriptSource } export interface AggregationsSerialDifferencingAggregation extends AggregationsPipelineAggregationBase { @@ -4343,7 +4343,7 @@ export interface AggregationsTermsAggregation extends AggregationsBucketAggregat missing_bucket?: boolean value_type?: string order?: AggregationsAggregateOrder - script?: Script | string + script?: Script | ScriptSource shard_min_doc_count?: long shard_size?: integer show_term_doc_count_error?: boolean @@ -4370,7 +4370,7 @@ export interface AggregationsTermsPartition { export interface AggregationsTestPopulation { field: Field - script?: Script | string + script?: Script | ScriptSource filter?: QueryDslQueryContainer } @@ -4457,7 +4457,7 @@ export interface AggregationsVariableWidthHistogramAggregation { buckets?: integer shard_size?: integer initial_buffer?: integer - script?: Script | string + script?: Script | ScriptSource } export interface AggregationsVariableWidthHistogramBucketKeys extends AggregationsMultiBucketBase { @@ -4481,7 +4481,7 @@ export interface AggregationsWeightedAverageAggregation { export interface AggregationsWeightedAverageValue { field?: Field missing?: double - script?: Script | string + script?: Script | ScriptSource } export interface AggregationsWeightedAvgAggregate extends AggregationsSingleMetricAggregateBase { @@ -4594,7 +4594,7 @@ export interface AnalysisCompoundWordTokenFilterBase extends AnalysisTokenFilter export interface AnalysisConditionTokenFilter extends AnalysisTokenFilterBase { type: 'condition' filter: string[] - script: Script | string + script: Script | ScriptSource } export interface AnalysisCustomAnalyzer { @@ -5109,7 +5109,7 @@ export interface AnalysisPortugueseAnalyzer { export interface AnalysisPredicateTokenFilter extends AnalysisTokenFilterBase { type: 'predicate_token_filter' - script: Script | string + script: Script | ScriptSource } export interface AnalysisRemoveDuplicatesTokenFilter extends AnalysisTokenFilterBase { @@ -5447,7 +5447,7 @@ export interface MappingDateNanosProperty extends MappingDocValuesPropertyBase { format?: string ignore_malformed?: boolean index?: boolean - script?: Script | string + script?: Script | ScriptSource on_script_error?: MappingOnScriptError null_value?: DateTime precision_step?: integer @@ -5460,7 +5460,7 @@ export interface MappingDateProperty extends MappingDocValuesPropertyBase { format?: string ignore_malformed?: boolean index?: boolean - script?: Script | string + script?: Script | ScriptSource on_script_error?: MappingOnScriptError null_value?: DateTime precision_step?: integer @@ -5516,7 +5516,7 @@ export interface MappingDynamicProperty extends MappingDocValuesPropertyBase { null_value?: FieldValue boost?: double coerce?: boolean - script?: Script | string + script?: Script | ScriptSource on_script_error?: MappingOnScriptError ignore_malformed?: boolean time_series_metric?: MappingTimeSeriesMetricType @@ -5594,7 +5594,7 @@ export interface MappingGeoPointProperty extends MappingDocValuesPropertyBase { null_value?: GeoLocation index?: boolean on_script_error?: MappingOnScriptError - script?: Script | string + script?: Script | ScriptSource type: 'geo_point' } @@ -5661,7 +5661,7 @@ export interface MappingIpProperty extends MappingDocValuesPropertyBase { ignore_malformed?: boolean null_value?: string on_script_error?: MappingOnScriptError - script?: Script | string + script?: Script | ScriptSource time_series_dimension?: boolean type: 'ip' } @@ -5681,7 +5681,7 @@ export interface MappingKeywordProperty extends MappingDocValuesPropertyBase { eager_global_ordinals?: boolean index?: boolean index_options?: MappingIndexOptions - script?: Script | string + script?: Script | ScriptSource on_script_error?: MappingOnScriptError normalizer?: string norms?: boolean @@ -5727,7 +5727,7 @@ export interface MappingNumberPropertyBase extends MappingDocValuesPropertyBase ignore_malformed?: boolean index?: boolean on_script_error?: MappingOnScriptError - script?: Script | string + script?: Script | ScriptSource time_series_metric?: MappingTimeSeriesMetricType time_series_dimension?: boolean } @@ -5796,7 +5796,7 @@ export interface MappingRuntimeField { input_field?: Field target_field?: Field target_index?: IndexName - script?: Script | string + script?: Script | ScriptSource type: MappingRuntimeFieldType } @@ -6199,7 +6199,7 @@ export interface QueryDslIntervalsFilter { not_containing?: QueryDslIntervalsContainer not_overlapping?: QueryDslIntervalsContainer overlapping?: QueryDslIntervalsContainer - script?: Script | string + script?: Script | ScriptSource } export interface QueryDslIntervalsFuzzy { @@ -6559,17 +6559,17 @@ export interface QueryDslRuleQuery extends QueryDslQueryBase { } export interface QueryDslScriptQuery extends QueryDslQueryBase { - script: Script | string + script: Script | ScriptSource } export interface QueryDslScriptScoreFunction { - script: Script | string + script: Script | ScriptSource } export interface QueryDslScriptScoreQuery extends QueryDslQueryBase { min_score?: float query: QueryDslQueryContainer - script: Script | string + script: Script | ScriptSource } export interface QueryDslSemanticQuery extends QueryDslQueryBase { @@ -6705,7 +6705,7 @@ export type QueryDslTermsQueryField = FieldValue[] | QueryDslTermsLookup export interface QueryDslTermsSetQuery extends QueryDslQueryBase { minimum_should_match?: MinimumShouldMatch minimum_should_match_field?: Field - minimum_should_match_script?: Script | string + minimum_should_match_script?: Script | ScriptSource terms: FieldValue[] } @@ -11585,8 +11585,8 @@ export interface IndicesSettingsSimilarityLmj { export interface IndicesSettingsSimilarityScripted { type: 'scripted' - script: Script | string - weight_script?: Script | string + script: Script | ScriptSource + weight_script?: Script | ScriptSource } export interface IndicesSlowlogSettings { @@ -14140,7 +14140,7 @@ export interface IngestPipelineSimulation { export interface IngestProcessorBase { description?: string - if?: Script | string + if?: Script | ScriptSource ignore_failure?: boolean on_failure?: IngestProcessorContainer[] tag?: string @@ -14235,9 +14235,9 @@ export interface IngestRerouteProcessor extends IngestProcessorBase { export interface IngestScriptProcessor extends IngestProcessorBase { id?: Id - lang?: string + lang?: ScriptLanguage params?: Record - source?: string + source?: ScriptSource } export interface IngestSetProcessor extends IngestProcessorBase { @@ -18647,7 +18647,7 @@ export interface SearchApplicationSearchApplicationParameters { } export interface SearchApplicationSearchApplicationTemplate { - script: Script | string + script: Script | ScriptSource } export interface SearchApplicationDeleteRequest extends RequestBase { @@ -18972,7 +18972,7 @@ export interface SecurityRoleMappingRule { export interface SecurityRoleTemplate { format?: SecurityTemplateFormat - template: Script | string + template: Script | ScriptSource } export type SecurityRoleTemplateInlineQuery = string | QueryDslQueryContainer @@ -21928,9 +21928,9 @@ export interface WatcherScheduleTriggerEvent { } export interface WatcherScriptCondition { - lang?: string + lang?: ScriptLanguage params?: Record - source?: string + source?: ScriptSource id?: string } diff --git a/specification/_global/msearch_template/types.ts b/specification/_global/msearch_template/types.ts index 0ef505266d..fcf80de827 100644 --- a/specification/_global/msearch_template/types.ts +++ b/specification/_global/msearch_template/types.ts @@ -21,6 +21,7 @@ import { MultisearchHeader } from '@global/msearch/types' import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { Id } from '@_types/common' +import { ScriptSource } from '@_types/Scripting' /** @codegen_names header, body */ export type RequestItem = MultisearchHeader | TemplateConfig @@ -50,5 +51,5 @@ export class TemplateConfig { * request body. It also supports Mustache variables. If no `id` is specified, this * parameter is required. */ - source?: string + source?: ScriptSource } diff --git a/specification/_global/render_search_template/RenderSearchTemplateRequest.ts b/specification/_global/render_search_template/RenderSearchTemplateRequest.ts index a0d3550eea..a92b2a2dad 100644 --- a/specification/_global/render_search_template/RenderSearchTemplateRequest.ts +++ b/specification/_global/render_search_template/RenderSearchTemplateRequest.ts @@ -21,6 +21,7 @@ import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { ScriptSource } from '@_types/Scripting' /** * Render a search template. @@ -71,6 +72,6 @@ export interface Request extends RequestBase { * These parameters also support Mustache variables. * If no `id` or `` is specified, this parameter is required. */ - source?: string + source?: ScriptSource } } diff --git a/specification/_global/search/_types/suggester.ts b/specification/_global/search/_types/suggester.ts index 80eba0280b..fcd004cfa4 100644 --- a/specification/_global/search/_types/suggester.ts +++ b/specification/_global/search/_types/suggester.ts @@ -30,6 +30,7 @@ import { } from '@_types/common' import { GeoHashPrecision, GeoLocation } from '@_types/Geo' import { double, float, integer, long } from '@_types/Numeric' +import { ScriptSource } from '@_types/Scripting' /** * @variants external @@ -353,7 +354,7 @@ export class PhraseSuggestCollateQuery { /** * The query source. */ - source?: string + source?: ScriptSource } export class PhraseSuggester extends SuggesterBase { diff --git a/specification/_global/search_template/SearchTemplateRequest.ts b/specification/_global/search_template/SearchTemplateRequest.ts index a25509caec..9ac0239dbc 100644 --- a/specification/_global/search_template/SearchTemplateRequest.ts +++ b/specification/_global/search_template/SearchTemplateRequest.ts @@ -27,6 +27,7 @@ import { Routing, SearchType } from '@_types/common' +import { ScriptSource } from '@_types/Scripting' import { Duration } from '@_types/Time' /** @@ -148,6 +149,6 @@ export interface Request extends RequestBase { * request body. It also supports Mustache variables. If no `id` is specified, this * parameter is required. */ - source?: string + source?: ScriptSource } } diff --git a/specification/_types/Scripting.ts b/specification/_types/Scripting.ts index 82110076d5..16d8afef65 100644 --- a/specification/_types/Scripting.ts +++ b/specification/_types/Scripting.ts @@ -51,7 +51,7 @@ export type ScriptSource = string | SearchRequestBody export class StoredScript { /** * The language the script is written in. - * For serach templates, use `mustache`. + * For search templates, use `mustache`. */ lang: ScriptLanguage options?: Dictionary @@ -69,7 +69,7 @@ export class Script { /** * The script source. */ - source?: string + source?: ScriptSource /** * The `id` for a stored script. */ diff --git a/specification/_types/Transform.ts b/specification/_types/Transform.ts index 149b834649..b58707f3fe 100644 --- a/specification/_types/Transform.ts +++ b/specification/_types/Transform.ts @@ -20,6 +20,7 @@ import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { SearchInputRequestDefinition } from '@watcher/_types/Input' +import { ScriptSource } from '@_types/Scripting' import { Duration } from './Time' export class Transform {} @@ -39,7 +40,7 @@ export class ScriptTransform { */ lang?: string params?: Dictionary - source?: string + source?: ScriptSource id?: string } diff --git a/specification/ingest/_types/Processors.ts b/specification/ingest/_types/Processors.ts index 43a5bf0496..f7ece01270 100644 --- a/specification/ingest/_types/Processors.ts +++ b/specification/ingest/_types/Processors.ts @@ -22,7 +22,7 @@ import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { Field, Fields, GrokPattern, Id, Name } from '@_types/common' import { GeoShapeRelation } from '@_types/Geo' import { double, integer, long } from '@_types/Numeric' -import { Script } from '@_types/Scripting' +import { Script, ScriptLanguage, ScriptSource } from '@_types/Scripting' import { SortOrder } from '@_types/sort' /** @@ -1412,7 +1412,7 @@ export class ScriptProcessor extends ProcessorBase { * Script language. * @server_default painless */ - lang?: string + lang?: ScriptLanguage /** * Object containing parameters for the script. */ @@ -1421,7 +1421,7 @@ export class ScriptProcessor extends ProcessorBase { * Inline script. * If no `id` is specified, this parameter is required. */ - source?: string + source?: ScriptSource } export class SetProcessor extends ProcessorBase { diff --git a/specification/watcher/_types/Conditions.ts b/specification/watcher/_types/Conditions.ts index b94f2574ba..9819d33265 100644 --- a/specification/watcher/_types/Conditions.ts +++ b/specification/watcher/_types/Conditions.ts @@ -21,6 +21,7 @@ import { AdditionalProperty } from '@spec_utils/behaviors' import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { FieldValue } from '@_types/common' +import { ScriptLanguage, ScriptSource } from '@_types/Scripting' export class AlwaysCondition {} @@ -80,8 +81,8 @@ export class ScriptCondition { /** * @server_default painless */ - lang?: string + lang?: ScriptLanguage params?: Dictionary - source?: string + source?: ScriptSource id?: string }