diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 4fc448ff3e..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,58 +51464,854 @@ } } }, - "_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" + } } - }, - "required": [ - "parent_type", - "query" ] + }, + "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.query_dsl:IdsQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" - }, - { + "_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": [ + "parent_type", + "query" + ] + } + ] + }, + "_types.query_dsl:IdsQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { "type": "object", "properties": { "values": { @@ -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": { @@ -73689,7 +74129,7 @@ "$ref": "#/components/schemas/_global.msearch:MultisearchHeader" }, { - "$ref": "#/components/schemas/_global.msearch:MultisearchBody" + "$ref": "#/components/schemas/_global.search._types:SearchRequestBody" } ] }, @@ -73731,169 +74171,6 @@ } } }, - "_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" - } - }, - "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" - }, - "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.", - "type": "string" - }, - "track_scores": { - "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.", - "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.", - "type": "boolean" - }, - "pit": { - "$ref": "#/components/schemas/_global.search._types:PointInTimeReference" - }, - "suggest": { - "$ref": "#/components/schemas/_global.search._types:Suggester" - } - } - }, "_global.msearch:ResponseItem": { "oneOf": [ { @@ -74065,8 +74342,7 @@ } }, "source": { - "description": "The script source.\nFor search templates, an object containing the search template.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } }, "required": [ @@ -81243,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.", @@ -81254,8 +81529,7 @@ } }, "source": { - "description": "Inline script.\nIf no `id` is specified, this parameter is required.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } } } @@ -87601,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" } } }, @@ -91418,253 +91691,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": [ { @@ -96779,7 +96805,7 @@ "type": "object", "properties": { "lang": { - "type": "string" + "$ref": "#/components/schemas/_types:ScriptLanguage" }, "params": { "type": "object", @@ -96788,7 +96814,7 @@ } }, "source": { - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" }, "id": { "type": "string" @@ -96827,7 +96853,7 @@ } }, "source": { - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" }, "id": { "type": "string" @@ -116407,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" } } }, @@ -116844,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 61a0b6bbfa..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,60 +30600,823 @@ } } }, - "_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" + } } - }, - "required": [ - "parent_type", - "query" ] + }, + "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.query_dsl:IdsQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl:QueryBase" - }, - { - "type": "object", - "properties": { + "_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" + ] + } + ] + }, + "_types.query_dsl:IdsQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl:QueryBase" + }, + { + "type": "object", + "properties": { "values": { "$ref": "#/components/schemas/_types:Ids" } @@ -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": [ @@ -48090,8 +48494,7 @@ } }, "source": { - "description": "The script source.\nFor search templates, an object containing the search template.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } }, "required": [ @@ -52224,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.", @@ -52235,8 +52637,7 @@ } }, "source": { - "description": "Inline script.\nIf no `id` is specified, this parameter is required.", - "type": "string" + "$ref": "#/components/schemas/_types:ScriptSource" } } } @@ -57351,7 +57752,7 @@ "$ref": "#/components/schemas/_global.msearch:MultisearchHeader" }, { - "$ref": "#/components/schemas/_global.msearch:MultisearchBody" + "$ref": "#/components/schemas/_global.search._types:SearchRequestBody" } ] }, @@ -57393,169 +57794,6 @@ } } }, - "_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" - } - }, - "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" - }, - "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.", - "type": "string" - }, - "track_scores": { - "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.", - "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.", - "type": "boolean" - }, - "pit": { - "$ref": "#/components/schemas/_global.search._types:PointInTimeReference" - }, - "suggest": { - "$ref": "#/components/schemas/_global.search._types:Suggester" - } - } - }, "_global.msearch:MultiSearchResult": { "type": "object", "properties": { @@ -57713,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" } } }, @@ -58491,220 +58728,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": [ { @@ -69150,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" } } }, @@ -69549,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 412c2c100d..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": { @@ -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", @@ -57151,8 +57209,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } }, @@ -57224,7 +57282,38 @@ } ], "shortcutProperty": "source", - "specLocation": "_types/Scripting.ts#L75-L99" + "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, @@ -57251,7 +57340,7 @@ "name": "ScriptLanguage", "namespace": "_types" }, - "specLocation": "_types/Scripting.ts#L24-L45" + "specLocation": "_types/Scripting.ts#L25-L46" }, { "kind": "enum", @@ -59393,7 +59482,7 @@ } } ], - "specLocation": "_types/Scripting.ts#L101-L104" + "specLocation": "_types/Scripting.ts#L91-L94" }, { "kind": "type_alias", @@ -73221,6 +73310,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 +73498,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 +73754,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 +74302,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": [ @@ -73933,7 +74366,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L101-L107" + "specLocation": "_global/search/_types/suggester.ts#L102-L108" }, { "kind": "interface", @@ -74018,7 +74451,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L109-L142", + "specLocation": "_global/search/_types/suggester.ts#L110-L143", "variants": { "kind": "container", "nonExhaustive": true @@ -74113,7 +74546,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L163-L181" + "specLocation": "_global/search/_types/suggester.ts#L164-L182" }, { "kind": "interface", @@ -74159,7 +74592,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L144-L159" + "specLocation": "_global/search/_types/suggester.ts#L145-L160" }, { "kind": "interface", @@ -74235,7 +74668,7 @@ } ], "shortcutProperty": "context", - "specLocation": "_global/search/_types/suggester.ts#L235-L264" + "specLocation": "_global/search/_types/suggester.ts#L236-L265" }, { "codegenNames": [ @@ -74250,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": [ { @@ -74346,7 +74779,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L196-L224" + "specLocation": "_global/search/_types/suggester.ts#L197-L225" }, { "kind": "interface", @@ -74395,7 +74828,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L183-L194" + "specLocation": "_global/search/_types/suggester.ts#L184-L195" }, { "inherits": { @@ -74572,7 +75005,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L359-L417" + "specLocation": "_global/search/_types/suggester.ts#L360-L418" }, { "kind": "interface", @@ -74625,7 +75058,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L333-L346" + "specLocation": "_global/search/_types/suggester.ts#L334-L347" }, { "kind": "interface", @@ -74653,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", @@ -74808,7 +75241,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L268-L331" + "specLocation": "_global/search/_types/suggester.ts#L269-L332" }, { "kind": "enum", @@ -74864,7 +75297,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L419-L428" + "specLocation": "_global/search/_types/suggester.ts#L420-L429" }, { "kind": "interface", @@ -74910,7 +75343,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L445-L461", + "specLocation": "_global/search/_types/suggester.ts#L446-L462", "variants": { "kind": "container" } @@ -74935,7 +75368,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L430-L435" + "specLocation": "_global/search/_types/suggester.ts#L431-L436" }, { "kind": "interface", @@ -74978,7 +75411,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L437-L441" + "specLocation": "_global/search/_types/suggester.ts#L438-L442" }, { "kind": "interface", @@ -75000,7 +75433,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L463-L468" + "specLocation": "_global/search/_types/suggester.ts#L464-L469" }, { "inherits": { @@ -75166,7 +75599,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L506-L568" + "specLocation": "_global/search/_types/suggester.ts#L507-L569" }, { "kind": "enum", @@ -75184,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", @@ -75214,7 +75647,281 @@ "name": "StringDistance", "namespace": "_global.search._types" }, - "specLocation": "_global/search/_types/suggester.ts#L472-L493" + "specLocation": "_global/search/_types/suggester.ts#L473-L494" + }, + { + "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": [ @@ -75232,7 +75939,7 @@ "name": "ResponseItem", "namespace": "_global.msearch" }, - "specLocation": "_global/msearch/types.ts#L211-L214", + "specLocation": "_global/msearch/types.ts#L53-L56", "type": { "items": [ { @@ -75302,7 +76009,7 @@ } } ], - "specLocation": "_global/msearch/types.ts#L216-L219" + "specLocation": "_global/msearch/types.ts#L58-L61" }, { "generics": [ @@ -82832,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": [ { @@ -82936,7 +83643,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L48-L55", + "specLocation": "_global/search/_types/suggester.ts#L49-L56", "variantName": "completion" }, { @@ -82980,7 +83687,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L42-L46" + "specLocation": "_global/search/_types/suggester.ts#L43-L47" }, { "generics": [ @@ -83127,7 +83834,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L73-L84" + "specLocation": "_global/search/_types/suggester.ts#L74-L85" }, { "inherits": { @@ -83169,7 +83876,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L57-L62", + "specLocation": "_global/search/_types/suggester.ts#L58-L63", "variantName": "phrase" }, { @@ -83224,7 +83931,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L86-L91" + "specLocation": "_global/search/_types/suggester.ts#L87-L92" }, { "inherits": { @@ -83266,7 +83973,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L64-L69", + "specLocation": "_global/search/_types/suggester.ts#L65-L70", "variantName": "term" }, { @@ -83332,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.", @@ -83377,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": [ { @@ -83469,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", @@ -107205,7 +107912,7 @@ "name": "ConditionOp", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L41-L48" + "specLocation": "watcher/_types/Conditions.ts#L42-L49" }, { "kind": "enum", @@ -107230,7 +107937,7 @@ "name": "ConditionType", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L64-L70" + "specLocation": "watcher/_types/Conditions.ts#L65-L71" }, { "kind": "enum", @@ -107544,7 +108251,7 @@ "name": "Quantifier", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L74-L77" + "specLocation": "watcher/_types/Conditions.ts#L75-L78" }, { "kind": "enum", @@ -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": { @@ -120641,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": { @@ -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", @@ -129766,8 +130430,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptLanguage", + "namespace": "_types" } } }, @@ -129797,8 +130461,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } @@ -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..6e09559ab0 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,481 +31223,7 @@ } } ], - "specLocation": "_global/msearch/types.ts#L206-L209" - }, - { - "kind": "interface", - "name": { - "name": "MultisearchBody", - "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", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "FieldCollapse", - "namespace": "_global.search._types" - } - } - }, - { - "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.", - "name": "explain", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "Configuration of search extensions defined by Elasticsearch plugins.", - "name": "ext", - "required": false, - "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, - "value": { - "kind": "user_defined_value" - } - } - }, - { - "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", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Fields", - "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.", - "name": "docvalue_fields", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "FieldAndFormat", - "namespace": "_types.query_dsl" - } - } - } - }, - { - "availability": { - "serverless": {}, - "stack": { - "since": "8.4.0" - } - }, - "description": "Defines the approximate kNN search to run.", - "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" - } - } - } - ] - } - }, - { - "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", - "required": false, - "serverDefault": 0, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "name": "highlight", - "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": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - }, - "singleKey": true, - "value": { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - } - } - } - }, - { - "description": "Minimum _score for matching documents. Documents with a lower _score are\nnot included in the search results.", - "name": "min_score", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - } - }, - { - "name": "post_filter", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "QueryContainer", - "namespace": "_types.query_dsl" - } - } - }, - { - "name": "profile", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "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" - } - } - } - ] - } - }, - { - "description": "Retrieve a script evaluation (based on different fields) for each hit.", - "name": "script_fields", - "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" - } - } - } - }, - { - "name": "search_after", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SortResults", - "namespace": "_types" - } - } - }, - { - "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", - "required": false, - "serverDefault": 10, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "docId": "sort-search-results", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html", - "name": "sort", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Sort", - "namespace": "_types" - } - } - }, - { - "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", - "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" - } - } - } - }, - { - "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", - "required": false, - "serverDefault": 0, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_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", - "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", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "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": "boolean", - "namespace": "_builtins" - } - } - }, - { - "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", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "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", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "RuntimeFields", - "namespace": "_types.mapping" - } - } - }, - { - "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", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "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": { - "kind": "instance_of", - "type": { - "name": "PointInTimeReference", - "namespace": "_global.search._types" - } - } - }, - { - "name": "suggest", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Suggester", - "namespace": "_global.search._types" - } - } - } - ], - "specLocation": "_global/msearch/types.ts#L70-L204" + "specLocation": "_global/msearch/types.ts#L48-L51" }, { "kind": "interface", @@ -31829,7 +31355,7 @@ } } ], - "specLocation": "_global/msearch/types.ts#L52-L67" + "specLocation": "_global/msearch/types.ts#L31-L46" }, { "kind": "request", @@ -32053,7 +31579,7 @@ "name": "RequestItem", "namespace": "_global.msearch" }, - "specLocation": "_global/msearch/types.ts#L47-L50", + "specLocation": "_global/msearch/types.ts#L26-L29", "type": { "kind": "union_of", "items": [ @@ -32067,8 +31593,8 @@ { "kind": "instance_of", "type": { - "name": "MultisearchBody", - "namespace": "_global.msearch" + "name": "SearchRequestBody", + "namespace": "_global.search._types" } } ] @@ -32124,7 +31650,7 @@ "name": "ResponseItem", "namespace": "_global.msearch" }, - "specLocation": "_global/msearch/types.ts#L211-L214", + "specLocation": "_global/msearch/types.ts#L53-L56", "type": { "kind": "union_of", "items": [ @@ -32281,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": [ @@ -32407,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", @@ -35354,8 +34880,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } @@ -35393,7 +34919,7 @@ } ], "query": [], - "specLocation": "_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L76" + "specLocation": "_global/render_search_template/RenderSearchTemplateRequest.ts#L26-L77" }, { "kind": "response", @@ -38074,7 +37600,7 @@ } ], "shortcutProperty": "context", - "specLocation": "_global/search/_types/suggester.ts#L235-L264" + "specLocation": "_global/search/_types/suggester.ts#L236-L265" }, { "kind": "interface", @@ -38140,7 +37666,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L48-L55", + "specLocation": "_global/search/_types/suggester.ts#L49-L56", "variantName": "completion" }, { @@ -38288,7 +37814,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L73-L84" + "specLocation": "_global/search/_types/suggester.ts#L74-L85" }, { "kind": "interface", @@ -38379,7 +37905,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L163-L181" + "specLocation": "_global/search/_types/suggester.ts#L164-L182" }, { "kind": "type_alias", @@ -38394,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": [ @@ -38861,7 +38387,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L268-L331" + "specLocation": "_global/search/_types/suggester.ts#L269-L332" }, { "kind": "interface", @@ -39241,7 +38767,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L109-L142", + "specLocation": "_global/search/_types/suggester.ts#L110-L143", "variants": { "kind": "container", "nonExhaustive": true @@ -40772,7 +40298,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L430-L435" + "specLocation": "_global/search/_types/suggester.ts#L431-L436" }, { "kind": "interface", @@ -40856,7 +40382,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L437-L441" + "specLocation": "_global/search/_types/suggester.ts#L438-L442" }, { "kind": "interface", @@ -40941,7 +40467,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L57-L62", + "specLocation": "_global/search/_types/suggester.ts#L58-L63", "variantName": "phrase" }, { @@ -40995,7 +40521,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L333-L346" + "specLocation": "_global/search/_types/suggester.ts#L334-L347" }, { "kind": "interface", @@ -41023,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", @@ -41063,7 +40589,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L419-L428" + "specLocation": "_global/search/_types/suggester.ts#L420-L429" }, { "kind": "interface", @@ -41117,7 +40643,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L86-L91" + "specLocation": "_global/search/_types/suggester.ts#L87-L92" }, { "kind": "interface", @@ -41294,7 +40820,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L359-L417" + "specLocation": "_global/search/_types/suggester.ts#L360-L418" }, { "kind": "interface", @@ -41706,7 +41232,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L183-L194" + "specLocation": "_global/search/_types/suggester.ts#L184-L195" }, { "kind": "interface", @@ -41897,6 +41423,555 @@ ], "specLocation": "_global/search/_types/profile.ts#L136-L140" }, + { + "kind": "interface", + "name": { + "name": "SearchRequestBody", + "namespace": "_global.search._types" + }, + "properties": [ + { + "aliases": [ + "aggs" + ], + "description": "Defines the aggregations that are run as part of the search request.", + "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" + } + } + } + }, + { + "description": "Collapses search results the values of the specified field.", + "name": "collapse", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FieldCollapse", + "namespace": "_global.search._types" + } + } + }, + { + "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": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "Configuration of search extensions defined by Elasticsearch plugins.", + "name": "ext", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "user_defined_value" + } + } + }, + { + "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": "integer", + "namespace": "_types" + } + } + }, + { + "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": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + "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": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FieldAndFormat", + "namespace": "_types.query_dsl" + } + } + } + }, + { + "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" + } + } + } + ] + } + }, + { + "availability": { + "stack": { + "since": "8.8.0" + } + }, + "description": "The Reciprocal Rank Fusion (RRF) to use.", + "name": "rank", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "RankContainer", + "namespace": "_types" + } + } + }, + { + "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": "double", + "namespace": "_types" + } + } + }, + { + "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": "QueryContainer", + "namespace": "_types.query_dsl" + } + } + }, + { + "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": "boolean", + "namespace": "_builtins" + } + } + }, + { + "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": "QueryContainer", + "namespace": "_types.query_dsl" + } + } + }, + { + "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": "RetrieverContainer", + "namespace": "_types" + } + } + }, + { + "description": "Retrieve a script evaluation (based on different fields) for each hit.", + "name": "script_fields", + "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" + } + } + } + }, + { + "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": "SortResults", + "namespace": "_types" + } + } + }, + { + "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": "integer", + "namespace": "_types" + } + } + }, + { + "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": { + "kind": "instance_of", + "type": { + "name": "Sort", + "namespace": "_types" + } + } + }, + { + "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": "SourceConfig", + "namespace": "_global.search._types" + } + } + }, + { + "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": "FieldAndFormat", + "namespace": "_types.query_dsl" + } + } + } + }, + { + "description": "Defines a suggester that provides similar looking terms based on a provided text.", + "name": "suggest", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Suggester", + "namespace": "_global.search._types" + } + } + }, + { + "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": "long", + "namespace": "_types" + } + } + }, + { + "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": "string", + "namespace": "_builtins" + } + } + }, + { + "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": "boolean", + "namespace": "_builtins" + } + } + }, + { + "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": "boolean", + "namespace": "_builtins" + } + } + }, + { + "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, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "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": "Fields", + "namespace": "_types" + } + } + }, + { + "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": "PointInTimeReference", + "namespace": "_global.search._types" + } + } + }, + { + "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": "RuntimeFields", + "namespace": "_types.mapping" + } + } + }, + { + "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": "string", + "namespace": "_builtins" + } + } + } + } + ], + "specLocation": "_global/search/_types/SearchRequestBody.ts#L42-L238" + }, { "kind": "interface", "name": { @@ -42056,7 +42131,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L445-L461", + "specLocation": "_global/search/_types/suggester.ts#L446-L462", "variants": { "kind": "container" } @@ -42192,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", @@ -42214,7 +42289,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L463-L468" + "specLocation": "_global/search/_types/suggester.ts#L464-L469" }, { "kind": "type_alias", @@ -42228,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": [ @@ -42309,7 +42384,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L42-L46" + "specLocation": "_global/search/_types/suggester.ts#L43-L47" }, { "kind": "interface", @@ -42386,7 +42461,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L196-L224" + "specLocation": "_global/search/_types/suggester.ts#L197-L225" }, { "kind": "enum", @@ -42404,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", @@ -42457,7 +42532,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L101-L107" + "specLocation": "_global/search/_types/suggester.ts#L102-L108" }, { "kind": "interface", @@ -42503,7 +42578,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L144-L159" + "specLocation": "_global/search/_types/suggester.ts#L145-L160" }, { "kind": "interface", @@ -42545,7 +42620,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L64-L69", + "specLocation": "_global/search/_types/suggester.ts#L65-L70", "variantName": "term" }, { @@ -42611,7 +42686,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L93-L99" + "specLocation": "_global/search/_types/suggester.ts#L94-L100" }, { "kind": "interface", @@ -42777,7 +42852,7 @@ } } ], - "specLocation": "_global/search/_types/suggester.ts#L506-L568" + "specLocation": "_global/search/_types/suggester.ts#L507-L569" }, { "kind": "interface", @@ -43768,8 +43843,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } @@ -43982,7 +44057,7 @@ } } ], - "specLocation": "_global/search_template/SearchTemplateRequest.ts#L32-L153" + "specLocation": "_global/search_template/SearchTemplateRequest.ts#L33-L154" }, { "kind": "response", @@ -52459,8 +52534,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } }, @@ -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": { @@ -52720,8 +52826,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } }, @@ -52737,7 +52843,7 @@ } } ], - "specLocation": "_types/Transform.ts#L36-L44" + "specLocation": "_types/Transform.ts#L37-L45" }, { "kind": "type_alias", @@ -53069,7 +53175,7 @@ } } ], - "specLocation": "_types/Transform.ts#L46-L49" + "specLocation": "_types/Transform.ts#L47-L50" }, { "kind": "enum", @@ -54050,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": { @@ -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", @@ -54542,7 +54648,7 @@ } } ], - "specLocation": "_types/Transform.ts#L27-L34", + "specLocation": "_types/Transform.ts#L28-L35", "variants": { "kind": "container" } @@ -160508,8 +160614,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptLanguage", + "namespace": "_types" } } }, @@ -160539,8 +160645,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } } @@ -233416,7 +233522,7 @@ "namespace": "watcher._types" }, "properties": [], - "specLocation": "watcher/_types/Conditions.ts#L25-L25" + "specLocation": "watcher/_types/Conditions.ts#L26-L26" }, { "kind": "interface", @@ -233468,7 +233574,7 @@ } } ], - "specLocation": "watcher/_types/Conditions.ts#L32-L39" + "specLocation": "watcher/_types/Conditions.ts#L33-L40" }, { "kind": "interface", @@ -233500,7 +233606,7 @@ } } ], - "specLocation": "watcher/_types/Conditions.ts#L27-L30" + "specLocation": "watcher/_types/Conditions.ts#L28-L31" }, { "kind": "interface", @@ -233633,7 +233739,7 @@ } } ], - "specLocation": "watcher/_types/Conditions.ts#L50-L62", + "specLocation": "watcher/_types/Conditions.ts#L51-L63", "variants": { "kind": "container" } @@ -233664,7 +233770,7 @@ "name": "ConditionOp", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L41-L48" + "specLocation": "watcher/_types/Conditions.ts#L42-L49" }, { "kind": "enum", @@ -233689,7 +233795,7 @@ "name": "ConditionType", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L64-L70" + "specLocation": "watcher/_types/Conditions.ts#L65-L71" }, { "kind": "enum", @@ -235483,7 +235589,7 @@ "namespace": "watcher._types" }, "properties": [], - "specLocation": "watcher/_types/Conditions.ts#L72-L72" + "specLocation": "watcher/_types/Conditions.ts#L73-L73" }, { "kind": "interface", @@ -235794,7 +235900,7 @@ "name": "Quantifier", "namespace": "watcher._types" }, - "specLocation": "watcher/_types/Conditions.ts#L74-L77" + "specLocation": "watcher/_types/Conditions.ts#L75-L78" }, { "kind": "interface", @@ -236171,8 +236277,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptLanguage", + "namespace": "_types" } } }, @@ -236200,8 +236306,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScriptSource", + "namespace": "_types" } } }, @@ -236217,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 babdec33d1..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": [] }, @@ -87,12 +88,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..942de34123 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -90,7 +90,7 @@ export interface BulkUpdateAction { 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 @@ -858,7 +823,7 @@ export interface MsearchTemplateTemplateConfig { id?: Id params?: Record profile?: boolean - source?: string + source?: ScriptSource } export interface MtermvectorsOperation { @@ -1070,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 } @@ -1154,7 +1119,7 @@ export interface RenderSearchTemplateRequest extends RequestBase { id?: Id file?: string params?: Record - source?: string + source?: ScriptSource } } @@ -1174,7 +1139,7 @@ export interface ScriptsPainlessExecuteRequest extends RequestBase { body?: { context?: ScriptsPainlessExecutePainlessContext context_setup?: ScriptsPainlessExecutePainlessContextSetup - script?: Script | string + script?: Script | ScriptSource } } @@ -1665,7 +1630,7 @@ export interface SearchPhraseSuggestCollate { export interface SearchPhraseSuggestCollateQuery { id?: Id - source?: string + source?: ScriptSource } export interface SearchPhraseSuggestHighlight { @@ -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 @@ -1958,7 +1961,7 @@ export interface SearchTemplateRequest extends RequestBase { id?: Id params?: Record profile?: boolean - source?: string + source?: ScriptSource } } @@ -2093,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 @@ -2142,7 +2145,7 @@ export interface UpdateByQueryRequest extends RequestBase { body?: { max_docs?: long query?: QueryDslQueryContainer - script?: Script | string + script?: Script | ScriptSource slice?: SlicedScroll conflicts?: Conflicts } @@ -2772,7 +2775,7 @@ export interface ScoreSort { } export interface Script { - source?: string + source?: ScriptSource id?: Id params?: Record lang?: ScriptLanguage @@ -2780,7 +2783,7 @@ export interface Script { } export interface ScriptField { - script: Script | string + script: Script | ScriptSource ignore_failure?: boolean } @@ -2788,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 @@ -2796,10 +2799,12 @@ export interface ScriptSort { export type ScriptSortType = 'string' | 'number' | 'version' +export type ScriptSource = string | SearchSearchRequestBody + export interface ScriptTransform { lang?: string params?: Record - source?: string + source?: ScriptSource id?: string } @@ -2935,7 +2940,7 @@ export interface StoreStats { export interface StoredScript { lang: ScriptLanguage options?: Record - source: string + source: ScriptSource } export type StreamResult = ArrayBuffer @@ -3198,7 +3203,7 @@ export interface AggregationsAutoDateHistogramAggregation extends AggregationsBu missing?: DateTime offset?: string params?: Record - script?: Script | string + script?: Script | ScriptSource time_zone?: TimeZone } @@ -3268,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 { @@ -3345,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 } @@ -3416,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 } @@ -3457,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 } @@ -3706,7 +3711,7 @@ export interface AggregationsHistogramAggregation extends AggregationsBucketAggr missing?: double offset?: double order?: AggregationsAggregateOrder - script?: Script | string + script?: Script | ScriptSource format?: string keyed?: boolean } @@ -3894,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 { @@ -4055,7 +4060,7 @@ export interface AggregationsRangeAggregation extends AggregationsBucketAggregat field?: Field missing?: integer ranges?: AggregationsAggregationRange[] - script?: Script | string + script?: Script | ScriptSource keyed?: boolean format?: string } @@ -4113,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 { @@ -4121,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 { @@ -4338,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 @@ -4365,7 +4370,7 @@ export interface AggregationsTermsPartition { export interface AggregationsTestPopulation { field: Field - script?: Script | string + script?: Script | ScriptSource filter?: QueryDslQueryContainer } @@ -4452,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 { @@ -4476,7 +4481,7 @@ export interface AggregationsWeightedAverageAggregation { export interface AggregationsWeightedAverageValue { field?: Field missing?: double - script?: Script | string + script?: Script | ScriptSource } export interface AggregationsWeightedAvgAggregate extends AggregationsSingleMetricAggregateBase { @@ -4589,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 { @@ -5104,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 { @@ -5442,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 @@ -5455,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 @@ -5511,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 @@ -5589,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' } @@ -5656,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' } @@ -5676,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 @@ -5722,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 } @@ -5791,7 +5796,7 @@ export interface MappingRuntimeField { input_field?: Field target_field?: Field target_index?: IndexName - script?: Script | string + script?: Script | ScriptSource type: MappingRuntimeFieldType } @@ -6194,7 +6199,7 @@ export interface QueryDslIntervalsFilter { not_containing?: QueryDslIntervalsContainer not_overlapping?: QueryDslIntervalsContainer overlapping?: QueryDslIntervalsContainer - script?: Script | string + script?: Script | ScriptSource } export interface QueryDslIntervalsFuzzy { @@ -6554,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 { @@ -6700,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[] } @@ -11580,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 { @@ -14135,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 @@ -14230,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 { @@ -18642,7 +18647,7 @@ export interface SearchApplicationSearchApplicationParameters { } export interface SearchApplicationSearchApplicationTemplate { - script: Script | string + script: Script | ScriptSource } export interface SearchApplicationDeleteRequest extends RequestBase { @@ -18967,7 +18972,7 @@ export interface SecurityRoleMappingRule { export interface SecurityRoleTemplate { format?: SecurityTemplateFormat - template: Script | string + template: Script | ScriptSource } export type SecurityRoleTemplateInlineQuery = string | QueryDslQueryContainer @@ -21923,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/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/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/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/_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 fe76655c5d..16d8afef65 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,10 +45,13 @@ 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. - * For serach templates, use `mustache`. + * For search templates, use `mustache`. */ lang: ScriptLanguage options?: Dictionary @@ -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 } /** @@ -79,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 }