From 48813433d9d98b81e66a99a30af4fd2e874eedda Mon Sep 17 00:00:00 2001 From: Samiul Monir <150824886+Samiul-TheSoccerFan@users.noreply.github.com> Date: Wed, 25 Jun 2025 10:32:30 -0400 Subject: [PATCH] Update requirement types for retriever fields (#4681) * Updating field types * adding generated types and jsons (cherry picked from commit 27eca8a20ce8f8997288809c7d675485bc54513c) --- output/openapi/elasticsearch-openapi.json | 2096 +++++---- .../elasticsearch-serverless-openapi.json | 3994 ++++++++--------- output/schema/schema.json | 8 +- output/typescript/types.ts | 8 +- specification/_types/Retriever.ts | 8 +- 5 files changed, 3055 insertions(+), 3059 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 2b611b2b70..26e887654f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -50848,158 +50848,6 @@ } } }, - "_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.GeoDistanceType": { "type": "string", "enum": [ @@ -51007,103 +50855,6 @@ "plane" ] }, - "_types.query_dsl.GeoGridQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object", - "properties": { - "geotile": { - "$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" - ] - } - ] - }, "_global.search._types.InnerHits": { "type": "object", "properties": { @@ -51597,114 +51348,153 @@ } } }, - "_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": { + "_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.query_dsl.QueryBase" + "$ref": "#/components/schemas/_types.RankBase" }, { "type": "object", "properties": { - "values": { - "$ref": "#/components/schemas/_types.Ids" + "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.Ids": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Id" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" - } - } - ] + "_types.RankBase": { + "type": "object" }, - "_types.query_dsl.IntervalsQuery": { + "_global.search._types.Rescore": { "allOf": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "type": "object", + "properties": { + "window_size": { + "type": "number" + } + } }, { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-intervals-query.html" - }, "type": "object", "properties": { - "all_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" - }, - "any_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" - }, - "fuzzy": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" - }, - "match": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsMatch" - }, - "prefix": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsPrefix" - }, - "range": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsRange" - }, - "regexp": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsRegexp" + "query": { + "$ref": "#/components/schemas/_global.search._types.RescoreQuery" }, - "wildcard": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsWildcard" + "learning_to_rank": { + "$ref": "#/components/schemas/_global.search._types.LearningToRank" } }, "minProperties": 1, @@ -51712,40 +51502,947 @@ } ] }, - "_types.query_dsl.IntervalsAllOf": { + "_global.search._types.RescoreQuery": { "type": "object", "properties": { - "intervals": { - "description": "An array of rules to combine. All rules must produce a match in a document for the overall source to match.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" - } + "rescore_query": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" }, - "max_gaps": { - "description": "Maximum number of positions between the matching terms.\nIntervals produced by the rules further apart than this are not considered matches.", + "query_weight": { + "description": "Relative importance of the original query versus the rescore query.", "type": "number" }, - "ordered": { - "description": "If `true`, intervals produced by the rules should appear in the order in which they are specified.", - "type": "boolean" + "rescore_query_weight": { + "description": "Relative importance of the rescore query versus the original query.", + "type": "number" }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + "score_mode": { + "$ref": "#/components/schemas/_global.search._types.ScoreMode" } }, "required": [ - "intervals" + "rescore_query" ] }, - "_types.query_dsl.IntervalsContainer": { + "_global.search._types.ScoreMode": { + "type": "string", + "enum": [ + "avg", + "max", + "min", + "multiply", + "total" + ] + }, + "_global.search._types.LearningToRank": { "type": "object", "properties": { - "all_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" + "model_id": { + "description": "The unique identifier of the trained model uploaded to Elasticsearch", + "type": "string" }, - "any_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" + "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" + }, + "rescorer": { + "$ref": "#/components/schemas/_types.RescorerRetriever" + }, + "linear": { + "$ref": "#/components/schemas/_types.LinearRetriever" + }, + "pinned": { + "$ref": "#/components/schemas/_types.PinnedRetriever" + } + }, + "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" + }, + "_name": { + "description": "Retriever name.", + "type": "string" + } + } + }, + "_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", + "inference_text", + "field" + ] + } + ] + }, + "_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.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Id" + }, + { + "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.RescorerRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "retriever": { + "$ref": "#/components/schemas/_types.RetrieverContainer" + }, + "rescore": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] + } + }, + "required": [ + "retriever", + "rescore" + ] + } + ] + }, + "_types.LinearRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "retrievers": { + "description": "Inner retrievers.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.InnerRetriever" + } + }, + "rank_window_size": { + "type": "number" + } + } + } + ] + }, + "_types.InnerRetriever": { + "type": "object", + "properties": { + "retriever": { + "$ref": "#/components/schemas/_types.RetrieverContainer" + }, + "weight": { + "type": "number" + }, + "normalizer": { + "$ref": "#/components/schemas/_types.ScoreNormalizer" + } + }, + "required": [ + "retriever", + "weight", + "normalizer" + ] + }, + "_types.ScoreNormalizer": { + "type": "string", + "enum": [ + "none", + "minmax", + "l2_norm" + ] + }, + "_types.PinnedRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" + }, + { + "type": "object", + "properties": { + "retriever": { + "$ref": "#/components/schemas/_types.RetrieverContainer" + }, + "ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.SpecifiedDocument" + } + }, + "rank_window_size": { + "type": "number" + } + }, + "required": [ + "retriever" + ] + } + ] + }, + "_types.SpecifiedDocument": { + "type": "object", + "properties": { + "index": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "id": { + "$ref": "#/components/schemas/_types.Id" + } + }, + "required": [ + "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.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": { + "geotile": { + "$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" + } + } + } + ] + }, + "_types.Ids": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Id" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + } + ] + }, + "_types.query_dsl.IntervalsQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-intervals-query.html" + }, + "type": "object", + "properties": { + "all_of": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" + }, + "any_of": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" + }, + "fuzzy": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" + }, + "match": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsMatch" + }, + "prefix": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsPrefix" + }, + "range": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsRange" + }, + "regexp": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsRegexp" + }, + "wildcard": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsWildcard" + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_types.query_dsl.IntervalsAllOf": { + "type": "object", + "properties": { + "intervals": { + "description": "An array of rules to combine. All rules must produce a match in a document for the overall source to match.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + }, + "max_gaps": { + "description": "Maximum number of positions between the matching terms.\nIntervals produced by the rules further apart than this are not considered matches.", + "type": "number" + }, + "ordered": { + "description": "If `true`, intervals produced by the rules should appear in the order in which they are specified.", + "type": "boolean" + }, + "filter": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + } + }, + "required": [ + "intervals" + ] + }, + "_types.query_dsl.IntervalsContainer": { + "type": "object", + "properties": { + "all_of": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" + }, + "any_of": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" }, "fuzzy": { "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" @@ -52019,49 +52716,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": [ { @@ -57043,263 +57697,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": { @@ -92833,405 +93230,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" - }, - "rescorer": { - "$ref": "#/components/schemas/_types.RescorerRetriever" - }, - "linear": { - "$ref": "#/components/schemas/_types.LinearRetriever" - }, - "pinned": { - "$ref": "#/components/schemas/_types.PinnedRetriever" - } - }, - "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" - }, - "_name": { - "description": "Retriever name.", - "type": "string" - } - } - }, - "_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.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Id" - }, - { - "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.RescorerRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.RetrieverBase" - }, - { - "type": "object", - "properties": { - "retriever": { - "$ref": "#/components/schemas/_types.RetrieverContainer" - }, - "rescore": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.Rescore" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Rescore" - } - } - ] - } - }, - "required": [ - "retriever", - "rescore" - ] - } - ] - }, - "_types.LinearRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.RetrieverBase" - }, - { - "type": "object", - "properties": { - "retrievers": { - "description": "Inner retrievers.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.InnerRetriever" - } - }, - "rank_window_size": { - "type": "number" - } - }, - "required": [ - "rank_window_size" - ] - } - ] - }, - "_types.InnerRetriever": { - "type": "object", - "properties": { - "retriever": { - "$ref": "#/components/schemas/_types.RetrieverContainer" - }, - "weight": { - "type": "number" - }, - "normalizer": { - "$ref": "#/components/schemas/_types.ScoreNormalizer" - } - }, - "required": [ - "retriever", - "weight", - "normalizer" - ] - }, - "_types.ScoreNormalizer": { - "type": "string", - "enum": [ - "none", - "minmax", - "l2_norm" - ] - }, - "_types.PinnedRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.RetrieverBase" - }, - { - "type": "object", - "properties": { - "retriever": { - "$ref": "#/components/schemas/_types.RetrieverContainer" - }, - "ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "docs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.SpecifiedDocument" - } - }, - "rank_window_size": { - "type": "number" - } - }, - "required": [ - "retriever", - "rank_window_size" - ] - } - ] - }, - "_types.SpecifiedDocument": { - "type": "object", - "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "required": [ - "id" - ] - }, "search_application._types.SearchApplication": { "allOf": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index a0452e541b..63164d7ce6 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -30928,114 +30928,120 @@ } } }, - "_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" }, - { - "type": "object", - "properties": { - "values": { - "$ref": "#/components/schemas/_types.Ids" - } - } + "model_text": { + "type": "string" } + }, + "required": [ + "model_id", + "model_text" ] }, - "_types.Ids": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Id" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" - } + "_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.IntervalsQuery": { + "_global.search._types.Rescore": { "allOf": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "type": "object", + "properties": { + "window_size": { + "type": "number" + } + } }, { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-intervals-query.html" - }, "type": "object", "properties": { - "all_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" - }, - "any_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" - }, - "fuzzy": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" - }, - "match": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsMatch" - }, - "prefix": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsPrefix" - }, - "range": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsRange" - }, - "regexp": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsRegexp" + "query": { + "$ref": "#/components/schemas/_global.search._types.RescoreQuery" }, - "wildcard": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsWildcard" + "learning_to_rank": { + "$ref": "#/components/schemas/_global.search._types.LearningToRank" } }, "minProperties": 1, @@ -31043,270 +31049,154 @@ } ] }, - "_types.query_dsl.IntervalsAllOf": { + "_global.search._types.RescoreQuery": { "type": "object", "properties": { - "intervals": { - "description": "An array of rules to combine. All rules must produce a match in a document for the overall source to match.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" - } + "rescore_query": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" }, - "max_gaps": { - "description": "Maximum number of positions between the matching terms.\nIntervals produced by the rules further apart than this are not considered matches.", + "query_weight": { + "description": "Relative importance of the original query versus the rescore query.", "type": "number" }, - "ordered": { - "description": "If `true`, intervals produced by the rules should appear in the order in which they are specified.", - "type": "boolean" + "rescore_query_weight": { + "description": "Relative importance of the rescore query versus the original query.", + "type": "number" }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + "score_mode": { + "$ref": "#/components/schemas/_global.search._types.ScoreMode" } }, "required": [ - "intervals" + "rescore_query" ] }, - "_types.query_dsl.IntervalsContainer": { + "_global.search._types.ScoreMode": { + "type": "string", + "enum": [ + "avg", + "max", + "min", + "multiply", + "total" + ] + }, + "_global.search._types.LearningToRank": { "type": "object", "properties": { - "all_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" - }, - "any_of": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" - }, - "fuzzy": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" - }, - "match": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsMatch" - }, - "prefix": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsPrefix" - }, - "range": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsRange" - }, - "regexp": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsRegexp" + "model_id": { + "description": "The unique identifier of the trained model uploaded to Elasticsearch", + "type": "string" }, - "wildcard": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsWildcard" + "params": { + "description": "Named parameters to be passed to the query templates used for feature", + "type": "object", + "additionalProperties": { + "type": "object" + } } }, - "minProperties": 1, - "maxProperties": 1 + "required": [ + "model_id" + ] }, - "_types.query_dsl.IntervalsAnyOf": { + "_types.RetrieverContainer": { "type": "object", "properties": { - "intervals": { - "description": "An array of rules to match.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" - } - }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" - } - }, - "required": [ - "intervals" - ] - }, - "_types.query_dsl.IntervalsFilter": { - "type": "object", - "properties": { - "after": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" - }, - "before": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + "standard": { + "$ref": "#/components/schemas/_types.StandardRetriever" }, - "contained_by": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + "knn": { + "$ref": "#/components/schemas/_types.KnnRetriever" }, - "containing": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + "rrf": { + "$ref": "#/components/schemas/_types.RRFRetriever" }, - "not_contained_by": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + "text_similarity_reranker": { + "$ref": "#/components/schemas/_types.TextSimilarityReranker" }, - "not_containing": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + "rule": { + "$ref": "#/components/schemas/_types.RuleRetriever" }, - "not_overlapping": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + "rescorer": { + "$ref": "#/components/schemas/_types.RescorerRetriever" }, - "overlapping": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + "linear": { + "$ref": "#/components/schemas/_types.LinearRetriever" }, - "script": { - "$ref": "#/components/schemas/_types.Script" + "pinned": { + "$ref": "#/components/schemas/_types.PinnedRetriever" } }, "minProperties": 1, "maxProperties": 1 }, - "_types.query_dsl.IntervalsFuzzy": { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to normalize the term.", - "type": "string" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types.Fuzziness" - }, - "prefix_length": { - "description": "Number of beginning characters left unchanged when creating expansions.", - "type": "number" - }, - "term": { - "description": "The term to match.", - "type": "string" - }, - "transpositions": { - "description": "Indicates whether edits include transpositions of two adjacent characters (for example, `ab` to `ba`).", - "type": "boolean" + "_types.StandardRetriever": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.RetrieverBase" }, - "use_field": { - "$ref": "#/components/schemas/_types.Field" + { + "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" + } + } } - }, - "required": [ - "term" ] }, - "_types.query_dsl.IntervalsMatch": { + "_types.RetrieverBase": { "type": "object", "properties": { - "analyzer": { - "description": "Analyzer used to analyze terms in the query.", - "type": "string" - }, - "max_gaps": { - "description": "Maximum number of positions between the matching terms.\nTerms further apart than this are not considered matches.", - "type": "number" - }, - "ordered": { - "description": "If `true`, matching terms must appear in their specified order.", - "type": "boolean" - }, - "query": { - "description": "Text you wish to find in the provided field.", - "type": "string" - }, - "use_field": { - "$ref": "#/components/schemas/_types.Field" - }, "filter": { - "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" - } - }, - "required": [ - "query" - ] - }, - "_types.query_dsl.IntervalsPrefix": { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to analyze the `prefix`.", - "type": "string" - }, - "prefix": { - "description": "Beginning characters of terms you wish to find in the top-level field.", - "type": "string" - }, - "use_field": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "prefix" - ] - }, - "_types.query_dsl.IntervalsRange": { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to analyze the `prefix`.", - "type": "string" - }, - "gte": { - "description": "Lower term, either gte or gt must be provided.", - "type": "string" - }, - "gt": { - "description": "Lower term, either gte or gt must be provided.", - "type": "string" + "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" + } + } + ] }, - "lte": { - "description": "Upper term, either lte or lt must be provided.", - "type": "string" + "min_score": { + "description": "Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.", + "type": "number" }, - "lt": { - "description": "Upper term, either lte or lt must be provided.", + "_name": { + "description": "Retriever name.", "type": "string" - }, - "use_field": { - "$ref": "#/components/schemas/_types.Field" } } }, - "_types.query_dsl.IntervalsRegexp": { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to analyze the `prefix`.", - "type": "string" - }, - "pattern": { - "description": "Regex pattern.", - "type": "string" - }, - "use_field": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "pattern" - ] - }, - "_types.query_dsl.IntervalsWildcard": { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to analyze the `pattern`.\nDefaults to the top-level field's analyzer.", - "type": "string" - }, - "pattern": { - "description": "Wildcard pattern used to find matching terms.", - "type": "string" - }, - "use_field": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "pattern" - ] - }, - "_types.KnnQuery": { + "_types.KnnRetriever": { "allOf": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "$ref": "#/components/schemas/_types.RetrieverBase" }, { "type": "object", "properties": { "field": { - "$ref": "#/components/schemas/_types.Field" + "description": "The name of the vector field to search against.", + "type": "string" }, "query_vector": { "$ref": "#/components/schemas/_types.QueryVector" @@ -31314,30 +31204,16 @@ "query_vector_builder": { "$ref": "#/components/schemas/_types.QueryVectorBuilder" }, - "num_candidates": { - "description": "The number of nearest neighbor candidates to consider per shard", - "type": "number" - }, "k": { - "description": "The final number of nearest neighbors to return as top hits", + "description": "Number of nearest neighbors to return as top hits.", "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" - } - } - ] + "num_candidates": { + "description": "Number of nearest neighbor candidates to consider per shard.", + "type": "number" }, "similarity": { - "description": "The minimum similarity for a vector to be considered a match", + "description": "The minimum similarity required for a document to be considered a match.", "type": "number" }, "rescore_vector": { @@ -31345,573 +31221,391 @@ } }, "required": [ - "field" + "field", + "k", + "num_candidates" ] } ] }, - "_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": { + "_types.RRFRetriever": { "allOf": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "$ref": "#/components/schemas/_types.RetrieverBase" }, { "type": "object", "properties": { - "analyzer": { - "description": "Analyzer used to convert the text in the query value into tokens.", - "type": "string" - }, - "auto_generate_synonyms_phrase_query": { - "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", - "type": "boolean" - }, - "cutoff_frequency": { - "deprecated": true, - "type": "number" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types.Fuzziness" - }, - "fuzzy_rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "fuzzy_transpositions": { - "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", - "type": "boolean" - }, - "lenient": { - "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", - "type": "boolean" + "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" + } }, - "max_expansions": { - "description": "Maximum number of terms to which the query will expand.", + "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" }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "operator": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "prefix_length": { - "description": "Number of beginning characters left unchanged for fuzzy matching.", + "rank_window_size": { + "description": "This value determines the size of the individual result sets per query.", "type": "number" - }, - "query": { - "description": "Text, number, boolean value or date you wish to find in the provided field.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "zero_terms_query": { - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" } }, "required": [ - "query" + "retrievers" ] } ] }, - "_types.query_dsl.ZeroTermsQuery": { - "type": "string", - "enum": [ - "all", - "none" - ] - }, - "_types.query_dsl.MatchAllQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" - }, - { - "type": "object" - } - ] - }, - "_types.query_dsl.MatchBoolPrefixQuery": { + "_types.TextSimilarityReranker": { "allOf": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "$ref": "#/components/schemas/_types.RetrieverBase" }, { "type": "object", "properties": { - "analyzer": { - "description": "Analyzer used to convert the text in the query value into tokens.", - "type": "string" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types.Fuzziness" - }, - "fuzzy_rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "fuzzy_transpositions": { - "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", - "type": "boolean" + "retriever": { + "$ref": "#/components/schemas/_types.RetrieverContainer" }, - "max_expansions": { - "description": "Maximum number of terms to which the query will expand.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "rank_window_size": { + "description": "This value determines how many documents we will consider from the nested retriever.", "type": "number" }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "operator": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" + "inference_id": { + "description": "Unique identifier of the inference endpoint created using the inference API.", + "type": "string" }, - "prefix_length": { - "description": "Number of beginning characters left unchanged for fuzzy matching.\nCan be applied to the term subqueries constructed for all terms but the final term.", - "type": "number" + "inference_text": { + "description": "The text snippet used as the basis for similarity comparison", + "type": "string" }, - "query": { - "description": "Terms you wish to find in the provided field.\nThe last term is used in a prefix query.", + "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": [ - "query" + "retriever", + "inference_text", + "field" ] } ] }, - "_types.query_dsl.MatchNoneQuery": { + "_types.RuleRetriever": { "allOf": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "$ref": "#/components/schemas/_types.RetrieverBase" }, { - "type": "object" + "type": "object", + "properties": { + "ruleset_ids": { + "description": "The ruleset IDs containing the rules this retriever is evaluating against.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Id" + }, + { + "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.query_dsl.MatchPhraseQuery": { + "_types.RescorerRetriever": { "allOf": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "$ref": "#/components/schemas/_types.RetrieverBase" }, { "type": "object", "properties": { - "analyzer": { - "description": "Analyzer used to convert the text in the query value into tokens.", - "type": "string" - }, - "query": { - "description": "Query terms that are analyzed and turned into a phrase query.", - "type": "string" - }, - "slop": { - "description": "Maximum number of positions allowed between matching tokens.", - "type": "number" + "retriever": { + "$ref": "#/components/schemas/_types.RetrieverContainer" }, - "zero_terms_query": { - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" + "rescore": { + "oneOf": [ + { + "$ref": "#/components/schemas/_global.search._types.Rescore" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.search._types.Rescore" + } + } + ] } }, "required": [ - "query" + "retriever", + "rescore" ] } ] }, - "_types.query_dsl.MatchPhrasePrefixQuery": { + "_types.LinearRetriever": { "allOf": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "$ref": "#/components/schemas/_types.RetrieverBase" }, { "type": "object", "properties": { - "analyzer": { - "description": "Analyzer used to convert text in the query value into tokens.", - "type": "string" - }, - "max_expansions": { - "description": "Maximum number of terms to which the last provided term of the query value will expand.", - "type": "number" - }, - "query": { - "description": "Text you wish to find in the provided field.", - "type": "string" + "retrievers": { + "description": "Inner retrievers.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.InnerRetriever" + } }, - "slop": { - "description": "Maximum number of positions allowed between matching tokens.", + "rank_window_size": { "type": "number" - }, - "zero_terms_query": { - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" } - }, - "required": [ - "query" - ] + } } ] }, - "_types.query_dsl.MoreLikeThisQuery": { + "_types.InnerRetriever": { + "type": "object", + "properties": { + "retriever": { + "$ref": "#/components/schemas/_types.RetrieverContainer" + }, + "weight": { + "type": "number" + }, + "normalizer": { + "$ref": "#/components/schemas/_types.ScoreNormalizer" + } + }, + "required": [ + "retriever", + "weight", + "normalizer" + ] + }, + "_types.ScoreNormalizer": { + "type": "string", + "enum": [ + "none", + "minmax", + "l2_norm" + ] + }, + "_types.PinnedRetriever": { "allOf": [ { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "$ref": "#/components/schemas/_types.RetrieverBase" }, { "type": "object", "properties": { - "analyzer": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html" - }, - "description": "The analyzer that is used to analyze the free form text.\nDefaults to the analyzer associated with the first field in fields.", - "type": "string" - }, - "boost_terms": { - "description": "Each term in the formed query could be further boosted by their tf-idf score.\nThis sets the boost factor to use when using this feature.\nDefaults to deactivated (0).", - "type": "number" - }, - "fail_on_unsupported_field": { - "description": "Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (`text` or `keyword`).", - "type": "boolean" + "retriever": { + "$ref": "#/components/schemas/_types.RetrieverContainer" }, - "fields": { - "description": "A list of fields to fetch and analyze the text from.\nDefaults to the `index.query.default_field` index setting, which has a default value of `*`.", + "ids": { "type": "array", "items": { - "$ref": "#/components/schemas/_types.Field" + "type": "string" } }, - "include": { - "description": "Specifies whether the input documents should also be included in the search results returned.", - "type": "boolean" - }, - "like": { - "description": "Specifies free form text and/or a single or multiple documents for which you want to find similar documents.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.Like" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.Like" - } - } - ] - }, - "max_doc_freq": { - "description": "The maximum document frequency above which the terms are ignored from the input document.", - "type": "number" - }, - "max_query_terms": { - "description": "The maximum number of query terms that can be selected.", - "type": "number" - }, - "max_word_length": { - "description": "The maximum word length above which the terms are ignored.\nDefaults to unbounded (`0`).", - "type": "number" - }, - "min_doc_freq": { - "description": "The minimum document frequency below which the terms are ignored from the input document.", - "type": "number" - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "min_term_freq": { - "description": "The minimum term frequency below which the terms are ignored from the input document.", - "type": "number" + "docs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.SpecifiedDocument" + } }, - "min_word_length": { - "description": "The minimum word length below which the terms are ignored.", + "rank_window_size": { "type": "number" - }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" - }, - "stop_words": { - "$ref": "#/components/schemas/_types.analysis.StopWords" - }, - "unlike": { - "description": "Used in combination with `like` to exclude documents that match a set of terms.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.Like" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.Like" - } - } - ] - }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" - }, - "version_type": { - "$ref": "#/components/schemas/_types.VersionType" } }, "required": [ - "like" + "retriever" ] } ] }, - "_types.query_dsl.Like": { - "description": "Text that we want similar documents for or a lookup to a document's field for the text.", - "oneOf": [ - { - "type": "string" + "_types.SpecifiedDocument": { + "type": "object", + "properties": { + "index": { + "$ref": "#/components/schemas/_types.IndexName" }, - { - "$ref": "#/components/schemas/_types.query_dsl.LikeDocument" + "id": { + "$ref": "#/components/schemas/_types.Id" } + }, + "required": [ + "id" ] }, - "_types.query_dsl.LikeDocument": { + "_types.SlicedScroll": { "type": "object", "properties": { - "doc": { - "description": "A document not present in the index.", - "type": "object" + "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.Field" + "$ref": "#/components/schemas/_types.mapping.RuntimeFieldFetchFields" } }, - "_id": { - "$ref": "#/components/schemas/_types.Id" + "format": { + "description": "A custom format for `date` type runtime fields.", + "type": "string" }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "input_field": { + "$ref": "#/components/schemas/_types.Field" }, - "per_field_analyzer": { - "description": "Overrides the default analyzer.", - "type": "object", - "additionalProperties": { - "type": "string" - } + "target_field": { + "$ref": "#/components/schemas/_types.Field" }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" + "target_index": { + "$ref": "#/components/schemas/_types.IndexName" }, - "version": { - "$ref": "#/components/schemas/_types.VersionNumber" + "script": { + "$ref": "#/components/schemas/_types.Script" }, - "version_type": { - "$ref": "#/components/schemas/_types.VersionType" + "type": { + "$ref": "#/components/schemas/_types.mapping.RuntimeFieldType" } - } - }, - "_types.VersionType": { - "type": "string", - "enum": [ - "internal", - "external", - "external_gte", - "force" + }, + "required": [ + "type" ] }, - "_types.analysis.StopWords": { - "description": "Language value, such as _arabic_ or _thai_. Defaults to _english_.\nEach language value corresponds to a predefined list of stop words in Lucene. See Stop words by language for supported language values and their stop words.\nAlso accepts an array of stop words.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.analysis.StopWordLanguage" - }, - { - "type": "array", - "items": { - "type": "string" - } + "_types.mapping.CompositeSubField": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/_types.mapping.RuntimeFieldType" } + }, + "required": [ + "type" ] }, - "_types.analysis.StopWordLanguage": { + "_types.mapping.RuntimeFieldType": { "type": "string", "enum": [ - "_arabic_", - "_armenian_", - "_basque_", - "_bengali_", - "_brazilian_", - "_bulgarian_", - "_catalan_", - "_cjk_", - "_czech_", - "_danish_", - "_dutch_", - "_english_", - "_estonian_", - "_finnish_", - "_french_", - "_galician_", - "_german_", - "_greek_", - "_hindi_", - "_hungarian_", - "_indonesian_", - "_irish_", - "_italian_", - "_latvian_", - "_lithuanian_", - "_norwegian_", - "_persian_", - "_portuguese_", - "_romanian_", - "_russian_", - "_serbian_", - "_sorani_", - "_spanish_", - "_swedish_", - "_thai_", - "_turkish_", - "_none_" + "boolean", + "composite", + "date", + "double", + "geo_point", + "geo_shape", + "ip", + "keyword", + "long", + "lookup" ] }, - "_types.query_dsl.MultiMatchQuery": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + "_types.mapping.RuntimeFieldFetchFields": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types.Field" }, - { - "type": "object", - "properties": { - "analyzer": { - "description": "Analyzer used to convert the text in the query value into tokens.", - "type": "string" - }, - "auto_generate_synonyms_phrase_query": { - "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", - "type": "boolean" - }, - "cutoff_frequency": { - "deprecated": true, - "type": "number" - }, - "fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "fuzziness": { - "$ref": "#/components/schemas/_types.Fuzziness" - }, - "fuzzy_rewrite": { - "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" - }, - "fuzzy_transpositions": { - "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", - "type": "boolean" - }, - "lenient": { - "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", - "type": "boolean" - }, - "max_expansions": { - "description": "Maximum number of terms to which the query will expand.", - "type": "number" - }, - "minimum_should_match": { - "$ref": "#/components/schemas/_types.MinimumShouldMatch" - }, - "operator": { - "$ref": "#/components/schemas/_types.query_dsl.Operator" - }, - "prefix_length": { - "description": "Number of beginning characters left unchanged for fuzzy matching.", - "type": "number" - }, - "query": { - "description": "Text, number, boolean value or date you wish to find in the provided field.", - "type": "string" - }, - "slop": { - "description": "Maximum number of positions allowed between matching tokens.", - "type": "number" - }, - "tie_breaker": { - "description": "Determines how scores for each per-term blended query and scores across groups are combined.", - "type": "number" - }, - "type": { - "$ref": "#/components/schemas/_types.query_dsl.TextQueryType" - }, - "zero_terms_query": { - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" - } - }, - "required": [ - "query" - ] + "format": { + "type": "string" } + }, + "required": [ + "field" ] }, - "_types.query_dsl.TextQueryType": { + "_types.query_dsl.ChildScoreMode": { "type": "string", "enum": [ - "best_fields", - "most_fields", - "cross_fields", - "phrase", - "phrase_prefix", - "bool_prefix" + "none", + "avg", + "sum", + "max", + "min" ] }, - "_types.query_dsl.NestedQuery": { + "_types.RelationName": { + "type": "string" + }, + "_types.query_dsl.HasParentQuery": { "allOf": [ { "$ref": "#/components/schemas/_types.query_dsl.QueryBase" @@ -31920,30 +31614,31 @@ "type": "object", "properties": { "ignore_unmapped": { - "description": "Indicates whether to ignore an unmapped path and not return any documents instead of an error.", + "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" }, - "path": { - "$ref": "#/components/schemas/_types.Field" + "parent_type": { + "$ref": "#/components/schemas/_types.RelationName" }, "query": { "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" }, - "score_mode": { - "$ref": "#/components/schemas/_types.query_dsl.ChildScoreMode" + "score": { + "description": "Indicates whether the relevance score of a matching parent document is aggregated into its child documents.", + "type": "boolean" } }, "required": [ - "path", + "parent_type", "query" ] } ] }, - "_types.query_dsl.ParentIdQuery": { + "_types.query_dsl.IdsQuery": { "allOf": [ { "$ref": "#/components/schemas/_types.query_dsl.QueryBase" @@ -31951,51 +31646,977 @@ { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "ignore_unmapped": { - "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", - "type": "boolean" - }, - "type": { - "$ref": "#/components/schemas/_types.RelationName" + "values": { + "$ref": "#/components/schemas/_types.Ids" } } } ] }, - "_types.query_dsl.PercolateQuery": { + "_types.Ids": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Id" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Id" + } + } + ] + }, + "_types.query_dsl.IntervalsQuery": { "allOf": [ { "$ref": "#/components/schemas/_types.query_dsl.QueryBase" }, { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-intervals-query.html" + }, "type": "object", "properties": { - "document": { - "description": "The source of the document being percolated.", - "type": "object" - }, - "documents": { - "description": "An array of sources of the documents being percolated.", - "type": "array", - "items": { - "type": "object" - } + "all_of": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" }, - "field": { - "$ref": "#/components/schemas/_types.Field" + "any_of": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "fuzzy": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" }, - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "match": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsMatch" }, - "name": { - "description": "The suffix used for the `_percolator_document_slot` field when multiple `percolate` queries are specified.", - "type": "string" + "prefix": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsPrefix" + }, + "range": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsRange" + }, + "regexp": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsRegexp" + }, + "wildcard": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsWildcard" + } + }, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, + "_types.query_dsl.IntervalsAllOf": { + "type": "object", + "properties": { + "intervals": { + "description": "An array of rules to combine. All rules must produce a match in a document for the overall source to match.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + }, + "max_gaps": { + "description": "Maximum number of positions between the matching terms.\nIntervals produced by the rules further apart than this are not considered matches.", + "type": "number" + }, + "ordered": { + "description": "If `true`, intervals produced by the rules should appear in the order in which they are specified.", + "type": "boolean" + }, + "filter": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + } + }, + "required": [ + "intervals" + ] + }, + "_types.query_dsl.IntervalsContainer": { + "type": "object", + "properties": { + "all_of": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAllOf" + }, + "any_of": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsAnyOf" + }, + "fuzzy": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFuzzy" + }, + "match": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsMatch" + }, + "prefix": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsPrefix" + }, + "range": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsRange" + }, + "regexp": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsRegexp" + }, + "wildcard": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsWildcard" + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.query_dsl.IntervalsAnyOf": { + "type": "object", + "properties": { + "intervals": { + "description": "An array of rules to match.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + } + }, + "filter": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + } + }, + "required": [ + "intervals" + ] + }, + "_types.query_dsl.IntervalsFilter": { + "type": "object", + "properties": { + "after": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + }, + "before": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + }, + "contained_by": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + }, + "containing": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + }, + "not_contained_by": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + }, + "not_containing": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + }, + "not_overlapping": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + }, + "overlapping": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsContainer" + }, + "script": { + "$ref": "#/components/schemas/_types.Script" + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "_types.query_dsl.IntervalsFuzzy": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to normalize the term.", + "type": "string" + }, + "fuzziness": { + "$ref": "#/components/schemas/_types.Fuzziness" + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged when creating expansions.", + "type": "number" + }, + "term": { + "description": "The term to match.", + "type": "string" + }, + "transpositions": { + "description": "Indicates whether edits include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "type": "boolean" + }, + "use_field": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "required": [ + "term" + ] + }, + "_types.query_dsl.IntervalsMatch": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to analyze terms in the query.", + "type": "string" + }, + "max_gaps": { + "description": "Maximum number of positions between the matching terms.\nTerms further apart than this are not considered matches.", + "type": "number" + }, + "ordered": { + "description": "If `true`, matching terms must appear in their specified order.", + "type": "boolean" + }, + "query": { + "description": "Text you wish to find in the provided field.", + "type": "string" + }, + "use_field": { + "$ref": "#/components/schemas/_types.Field" + }, + "filter": { + "$ref": "#/components/schemas/_types.query_dsl.IntervalsFilter" + } + }, + "required": [ + "query" + ] + }, + "_types.query_dsl.IntervalsPrefix": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to analyze the `prefix`.", + "type": "string" + }, + "prefix": { + "description": "Beginning characters of terms you wish to find in the top-level field.", + "type": "string" + }, + "use_field": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "required": [ + "prefix" + ] + }, + "_types.query_dsl.IntervalsRange": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to analyze the `prefix`.", + "type": "string" + }, + "gte": { + "description": "Lower term, either gte or gt must be provided.", + "type": "string" + }, + "gt": { + "description": "Lower term, either gte or gt must be provided.", + "type": "string" + }, + "lte": { + "description": "Upper term, either lte or lt must be provided.", + "type": "string" + }, + "lt": { + "description": "Upper term, either lte or lt must be provided.", + "type": "string" + }, + "use_field": { + "$ref": "#/components/schemas/_types.Field" + } + } + }, + "_types.query_dsl.IntervalsRegexp": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to analyze the `prefix`.", + "type": "string" + }, + "pattern": { + "description": "Regex pattern.", + "type": "string" + }, + "use_field": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "required": [ + "pattern" + ] + }, + "_types.query_dsl.IntervalsWildcard": { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to analyze the `pattern`.\nDefaults to the top-level field's analyzer.", + "type": "string" + }, + "pattern": { + "description": "Wildcard pattern used to find matching terms.", + "type": "string" + }, + "use_field": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "required": [ + "pattern" + ] + }, + "_types.KnnQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types.Field" + }, + "query_vector": { + "$ref": "#/components/schemas/_types.QueryVector" + }, + "query_vector_builder": { + "$ref": "#/components/schemas/_types.QueryVectorBuilder" + }, + "num_candidates": { + "description": "The number of nearest neighbor candidates to consider per shard", + "type": "number" + }, + "k": { + "description": "The final number of nearest neighbors to return as top hits", + "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" + }, + "rescore_vector": { + "$ref": "#/components/schemas/_types.RescoreVector" + } + }, + "required": [ + "field" + ] + } + ] + }, + "_types.query_dsl.MatchQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert the text in the query value into tokens.", + "type": "string" + }, + "auto_generate_synonyms_phrase_query": { + "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "type": "boolean" + }, + "cutoff_frequency": { + "deprecated": true, + "type": "number" + }, + "fuzziness": { + "$ref": "#/components/schemas/_types.Fuzziness" + }, + "fuzzy_rewrite": { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + }, + "fuzzy_transpositions": { + "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).", + "type": "boolean" + }, + "lenient": { + "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", + "type": "boolean" + }, + "max_expansions": { + "description": "Maximum number of terms to which the query will expand.", + "type": "number" + }, + "minimum_should_match": { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + }, + "operator": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged for fuzzy matching.", + "type": "number" + }, + "query": { + "description": "Text, number, boolean value or date you wish to find in the provided field.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "zero_terms_query": { + "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.ZeroTermsQuery": { + "type": "string", + "enum": [ + "all", + "none" + ] + }, + "_types.query_dsl.MatchAllQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.MatchBoolPrefixQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert the text in the query value into tokens.", + "type": "string" + }, + "fuzziness": { + "$ref": "#/components/schemas/_types.Fuzziness" + }, + "fuzzy_rewrite": { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + }, + "fuzzy_transpositions": { + "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", + "type": "boolean" + }, + "max_expansions": { + "description": "Maximum number of terms to which the query will expand.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "type": "number" + }, + "minimum_should_match": { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + }, + "operator": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged for fuzzy matching.\nCan be applied to the term subqueries constructed for all terms but the final term.", + "type": "number" + }, + "query": { + "description": "Terms you wish to find in the provided field.\nThe last term is used in a prefix query.", + "type": "string" + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.MatchNoneQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object" + } + ] + }, + "_types.query_dsl.MatchPhraseQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert the text in the query value into tokens.", + "type": "string" + }, + "query": { + "description": "Query terms that are analyzed and turned into a phrase query.", + "type": "string" + }, + "slop": { + "description": "Maximum number of positions allowed between matching tokens.", + "type": "number" + }, + "zero_terms_query": { + "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.MatchPhrasePrefixQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert text in the query value into tokens.", + "type": "string" + }, + "max_expansions": { + "description": "Maximum number of terms to which the last provided term of the query value will expand.", + "type": "number" + }, + "query": { + "description": "Text you wish to find in the provided field.", + "type": "string" + }, + "slop": { + "description": "Maximum number of positions allowed between matching tokens.", + "type": "number" + }, + "zero_terms_query": { + "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.MoreLikeThisQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html" + }, + "description": "The analyzer that is used to analyze the free form text.\nDefaults to the analyzer associated with the first field in fields.", + "type": "string" + }, + "boost_terms": { + "description": "Each term in the formed query could be further boosted by their tf-idf score.\nThis sets the boost factor to use when using this feature.\nDefaults to deactivated (0).", + "type": "number" + }, + "fail_on_unsupported_field": { + "description": "Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (`text` or `keyword`).", + "type": "boolean" + }, + "fields": { + "description": "A list of fields to fetch and analyze the text from.\nDefaults to the `index.query.default_field` index setting, which has a default value of `*`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "include": { + "description": "Specifies whether the input documents should also be included in the search results returned.", + "type": "boolean" + }, + "like": { + "description": "Specifies free form text and/or a single or multiple documents for which you want to find similar documents.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Like" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.Like" + } + } + ] + }, + "max_doc_freq": { + "description": "The maximum document frequency above which the terms are ignored from the input document.", + "type": "number" + }, + "max_query_terms": { + "description": "The maximum number of query terms that can be selected.", + "type": "number" + }, + "max_word_length": { + "description": "The maximum word length above which the terms are ignored.\nDefaults to unbounded (`0`).", + "type": "number" + }, + "min_doc_freq": { + "description": "The minimum document frequency below which the terms are ignored from the input document.", + "type": "number" + }, + "minimum_should_match": { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + }, + "min_term_freq": { + "description": "The minimum term frequency below which the terms are ignored from the input document.", + "type": "number" + }, + "min_word_length": { + "description": "The minimum word length below which the terms are ignored.", + "type": "number" + }, + "routing": { + "$ref": "#/components/schemas/_types.Routing" + }, + "stop_words": { + "$ref": "#/components/schemas/_types.analysis.StopWords" + }, + "unlike": { + "description": "Used in combination with `like` to exclude documents that match a set of terms.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.Like" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.query_dsl.Like" + } + } + ] + }, + "version": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "version_type": { + "$ref": "#/components/schemas/_types.VersionType" + } + }, + "required": [ + "like" + ] + } + ] + }, + "_types.query_dsl.Like": { + "description": "Text that we want similar documents for or a lookup to a document's field for the text.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_types.query_dsl.LikeDocument" + } + ] + }, + "_types.query_dsl.LikeDocument": { + "type": "object", + "properties": { + "doc": { + "description": "A document not present in the index.", + "type": "object" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } + }, + "_id": { + "$ref": "#/components/schemas/_types.Id" + }, + "_index": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "per_field_analyzer": { + "description": "Overrides the default analyzer.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "routing": { + "$ref": "#/components/schemas/_types.Routing" + }, + "version": { + "$ref": "#/components/schemas/_types.VersionNumber" + }, + "version_type": { + "$ref": "#/components/schemas/_types.VersionType" + } + } + }, + "_types.VersionType": { + "type": "string", + "enum": [ + "internal", + "external", + "external_gte", + "force" + ] + }, + "_types.analysis.StopWords": { + "description": "Language value, such as _arabic_ or _thai_. Defaults to _english_.\nEach language value corresponds to a predefined list of stop words in Lucene. See Stop words by language for supported language values and their stop words.\nAlso accepts an array of stop words.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.analysis.StopWordLanguage" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "_types.analysis.StopWordLanguage": { + "type": "string", + "enum": [ + "_arabic_", + "_armenian_", + "_basque_", + "_bengali_", + "_brazilian_", + "_bulgarian_", + "_catalan_", + "_cjk_", + "_czech_", + "_danish_", + "_dutch_", + "_english_", + "_estonian_", + "_finnish_", + "_french_", + "_galician_", + "_german_", + "_greek_", + "_hindi_", + "_hungarian_", + "_indonesian_", + "_irish_", + "_italian_", + "_latvian_", + "_lithuanian_", + "_norwegian_", + "_persian_", + "_portuguese_", + "_romanian_", + "_russian_", + "_serbian_", + "_sorani_", + "_spanish_", + "_swedish_", + "_thai_", + "_turkish_", + "_none_" + ] + }, + "_types.query_dsl.MultiMatchQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "analyzer": { + "description": "Analyzer used to convert the text in the query value into tokens.", + "type": "string" + }, + "auto_generate_synonyms_phrase_query": { + "description": "If `true`, match phrase queries are automatically created for multi-term synonyms.", + "type": "boolean" + }, + "cutoff_frequency": { + "deprecated": true, + "type": "number" + }, + "fields": { + "$ref": "#/components/schemas/_types.Fields" + }, + "fuzziness": { + "$ref": "#/components/schemas/_types.Fuzziness" + }, + "fuzzy_rewrite": { + "$ref": "#/components/schemas/_types.MultiTermQueryRewrite" + }, + "fuzzy_transpositions": { + "description": "If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).\nCan be applied to the term subqueries constructed for all terms but the final term.", + "type": "boolean" + }, + "lenient": { + "description": "If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.", + "type": "boolean" + }, + "max_expansions": { + "description": "Maximum number of terms to which the query will expand.", + "type": "number" + }, + "minimum_should_match": { + "$ref": "#/components/schemas/_types.MinimumShouldMatch" + }, + "operator": { + "$ref": "#/components/schemas/_types.query_dsl.Operator" + }, + "prefix_length": { + "description": "Number of beginning characters left unchanged for fuzzy matching.", + "type": "number" + }, + "query": { + "description": "Text, number, boolean value or date you wish to find in the provided field.", + "type": "string" + }, + "slop": { + "description": "Maximum number of positions allowed between matching tokens.", + "type": "number" + }, + "tie_breaker": { + "description": "Determines how scores for each per-term blended query and scores across groups are combined.", + "type": "number" + }, + "type": { + "$ref": "#/components/schemas/_types.query_dsl.TextQueryType" + }, + "zero_terms_query": { + "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery" + } + }, + "required": [ + "query" + ] + } + ] + }, + "_types.query_dsl.TextQueryType": { + "type": "string", + "enum": [ + "best_fields", + "most_fields", + "cross_fields", + "phrase", + "phrase_prefix", + "bool_prefix" + ] + }, + "_types.query_dsl.NestedQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "ignore_unmapped": { + "description": "Indicates whether to ignore an unmapped path and not return any documents instead of an error.", + "type": "boolean" + }, + "inner_hits": { + "$ref": "#/components/schemas/_global.search._types.InnerHits" + }, + "path": { + "$ref": "#/components/schemas/_types.Field" + }, + "query": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + "score_mode": { + "$ref": "#/components/schemas/_types.query_dsl.ChildScoreMode" + } + }, + "required": [ + "path", + "query" + ] + } + ] + }, + "_types.query_dsl.ParentIdQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/_types.Id" + }, + "ignore_unmapped": { + "description": "Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.", + "type": "boolean" + }, + "type": { + "$ref": "#/components/schemas/_types.RelationName" + } + } + } + ] + }, + "_types.query_dsl.PercolateQuery": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.query_dsl.QueryBase" + }, + { + "type": "object", + "properties": { + "document": { + "description": "The source of the document being percolated.", + "type": "object" + }, + "documents": { + "description": "An array of sources of the documents being percolated.", + "type": "array", + "items": { + "type": "object" + } + }, + "field": { + "$ref": "#/components/schemas/_types.Field" + }, + "id": { + "$ref": "#/components/schemas/_types.Id" + }, + "index": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "name": { + "description": "The suffix used for the `_percolator_document_slot` field when multiple `percolate` queries are specified.", + "type": "string" }, "preference": { "description": "Preference used to fetch document to percolate.", @@ -36131,477 +36752,220 @@ }, "highlight": { "$ref": "#/components/schemas/_global.search._types.Highlight" - }, - "script_fields": { - "description": "Returns the result of one or more script evaluations for each hit.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_types.ScriptField" - } - }, - "size": { - "description": "The maximum number of top matching hits to return per bucket.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "_source": { - "$ref": "#/components/schemas/_global.search._types.SourceConfig" - }, - "stored_fields": { - "$ref": "#/components/schemas/_types.Fields" - }, - "track_scores": { - "description": "If `true`, calculates and returns document scores, even if the scores are not used for sorting.", - "type": "boolean" - }, - "version": { - "description": "If `true`, returns document version as part of a hit.", - "type": "boolean" - }, - "seq_no_primary_term": { - "description": "If `true`, returns sequence number and primary term of the last modification of each hit.", - "type": "boolean" - } - } - } - ] - }, - "_types.aggregations.TTestAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.Aggregation" - }, - { - "type": "object", - "properties": { - "a": { - "$ref": "#/components/schemas/_types.aggregations.TestPopulation" - }, - "b": { - "$ref": "#/components/schemas/_types.aggregations.TestPopulation" - }, - "type": { - "$ref": "#/components/schemas/_types.aggregations.TTestType" - } - } - } - ] - }, - "_types.aggregations.TestPopulation": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - }, - "filter": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" - } - }, - "required": [ - "field" - ] - }, - "_types.aggregations.TTestType": { - "type": "string", - "enum": [ - "paired", - "homoscedastic", - "heteroscedastic" - ] - }, - "_types.aggregations.TopMetricsAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" - }, - { - "type": "object", - "properties": { - "metrics": { - "description": "The fields of the top document to return.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.TopMetricsValue" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.aggregations.TopMetricsValue" - } - } - ] - }, - "size": { - "description": "The number of top documents from which to return metrics.", - "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - } - } - } - ] - }, - "_types.aggregations.TopMetricsValue": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - } - }, - "required": [ - "field" - ] - }, - "_types.aggregations.ValueCountAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.FormattableMetricAggregation" - }, - { - "type": "object" - } - ] - }, - "_types.aggregations.FormattableMetricAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" - }, - { - "type": "object", - "properties": { - "format": { - "type": "string" - } - } - } - ] - }, - "_types.aggregations.WeightedAverageAggregation": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.aggregations.Aggregation" - }, - { - "type": "object", - "properties": { - "format": { - "description": "A numeric response formatter.", - "type": "string" - }, - "value": { - "$ref": "#/components/schemas/_types.aggregations.WeightedAverageValue" - }, - "value_type": { - "$ref": "#/components/schemas/_types.aggregations.ValueType" - }, - "weight": { - "$ref": "#/components/schemas/_types.aggregations.WeightedAverageValue" - } - } - } - ] - }, - "_types.aggregations.WeightedAverageValue": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "missing": { - "description": "A value or weight to use if the field is missing.", - "type": "number" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - } - } - }, - "_types.aggregations.VariableWidthHistogramAggregation": { - "type": "object", - "properties": { - "field": { - "$ref": "#/components/schemas/_types.Field" - }, - "buckets": { - "description": "The target number of buckets.", - "type": "number" - }, - "shard_size": { - "description": "The number of buckets that the coordinating node will request from each shard.\nDefaults to `buckets * 50`.", - "type": "number" - }, - "initial_buffer": { - "description": "Specifies the number of individual documents that will be stored in memory on a shard before the initial bucketing algorithm is run.\nDefaults to `min(10 * shard_size, 50000)`.", - "type": "number" - }, - "script": { - "$ref": "#/components/schemas/_types.Script" - } - } - }, - "_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" + }, + "script_fields": { + "description": "Returns the result of one or more script evaluations for each hit.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.ScriptField" } + }, + "size": { + "description": "The maximum number of top matching hits to return per bucket.", + "type": "number" + }, + "sort": { + "$ref": "#/components/schemas/_types.Sort" + }, + "_source": { + "$ref": "#/components/schemas/_global.search._types.SourceConfig" + }, + "stored_fields": { + "$ref": "#/components/schemas/_types.Fields" + }, + "track_scores": { + "description": "If `true`, calculates and returns document scores, even if the scores are not used for sorting.", + "type": "boolean" + }, + "version": { + "description": "If `true`, returns document version as part of a hit.", + "type": "boolean" + }, + "seq_no_primary_term": { + "description": "If `true`, returns sequence number and primary term of the last modification of each hit.", + "type": "boolean" } - ] - }, - "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": { + "_types.aggregations.TTestAggregation": { "allOf": [ { - "type": "object", - "properties": { - "window_size": { - "type": "number" - } - } + "$ref": "#/components/schemas/_types.aggregations.Aggregation" }, { "type": "object", "properties": { - "query": { - "$ref": "#/components/schemas/_global.search._types.RescoreQuery" + "a": { + "$ref": "#/components/schemas/_types.aggregations.TestPopulation" }, - "learning_to_rank": { - "$ref": "#/components/schemas/_global.search._types.LearningToRank" + "b": { + "$ref": "#/components/schemas/_types.aggregations.TestPopulation" + }, + "type": { + "$ref": "#/components/schemas/_types.aggregations.TTestType" } - }, - "minProperties": 1, - "maxProperties": 1 + } } ] }, - "_global.search._types.RescoreQuery": { + "_types.aggregations.TestPopulation": { "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" + "field": { + "$ref": "#/components/schemas/_types.Field" }, - "rescore_query_weight": { - "description": "Relative importance of the rescore query versus the original query.", - "type": "number" + "script": { + "$ref": "#/components/schemas/_types.Script" }, - "score_mode": { - "$ref": "#/components/schemas/_global.search._types.ScoreMode" + "filter": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" } }, "required": [ - "rescore_query" + "field" ] }, - "_global.search._types.ScoreMode": { + "_types.aggregations.TTestType": { "type": "string", "enum": [ - "avg", - "max", - "min", - "multiply", - "total" + "paired", + "homoscedastic", + "heteroscedastic" ] }, - "_global.search._types.LearningToRank": { - "type": "object", - "properties": { - "model_id": { - "description": "The unique identifier of the trained model uploaded to Elasticsearch", - "type": "string" + "_types.aggregations.TopMetricsAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" }, - "params": { - "description": "Named parameters to be passed to the query templates used for feature", + { "type": "object", - "additionalProperties": { - "type": "object" + "properties": { + "metrics": { + "description": "The fields of the top document to return.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.TopMetricsValue" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.aggregations.TopMetricsValue" + } + } + ] + }, + "size": { + "description": "The number of top documents from which to return metrics.", + "type": "number" + }, + "sort": { + "$ref": "#/components/schemas/_types.Sort" + } } } - }, - "required": [ - "model_id" ] }, - "_types.SlicedScroll": { + "_types.aggregations.TopMetricsValue": { "type": "object", "properties": { "field": { "$ref": "#/components/schemas/_types.Field" - }, - "id": { - "$ref": "#/components/schemas/_types.Id" - }, - "max": { - "type": "number" } }, "required": [ - "id", - "max" + "field" ] }, - "_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" + "_types.aggregations.ValueCountAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.FormattableMetricAggregation" }, - "keep_alive": { - "$ref": "#/components/schemas/_types.Duration" + { + "type": "object" } - }, - "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" - } + "_types.aggregations.FormattableMetricAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.MetricAggregationBase" }, - "fetch_fields": { - "description": "For type `lookup`", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFieldFetchFields" + { + "type": "object", + "properties": { + "format": { + "type": "string" + } } - }, - "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" + "_types.aggregations.WeightedAverageAggregation": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.aggregations.Aggregation" + }, + { + "type": "object", + "properties": { + "format": { + "description": "A numeric response formatter.", + "type": "string" + }, + "value": { + "$ref": "#/components/schemas/_types.aggregations.WeightedAverageValue" + }, + "value_type": { + "$ref": "#/components/schemas/_types.aggregations.ValueType" + }, + "weight": { + "$ref": "#/components/schemas/_types.aggregations.WeightedAverageValue" + } + } } - }, - "required": [ - "type" ] }, - "_types.mapping.RuntimeFieldType": { - "type": "string", - "enum": [ - "boolean", - "composite", - "date", - "double", - "geo_point", - "geo_shape", - "ip", - "keyword", - "long", - "lookup" - ] + "_types.aggregations.WeightedAverageValue": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types.Field" + }, + "missing": { + "description": "A value or weight to use if the field is missing.", + "type": "number" + }, + "script": { + "$ref": "#/components/schemas/_types.Script" + } + } }, - "_types.mapping.RuntimeFieldFetchFields": { + "_types.aggregations.VariableWidthHistogramAggregation": { "type": "object", "properties": { "field": { "$ref": "#/components/schemas/_types.Field" }, - "format": { - "type": "string" + "buckets": { + "description": "The target number of buckets.", + "type": "number" + }, + "shard_size": { + "description": "The number of buckets that the coordinating node will request from each shard.\nDefaults to `buckets * 50`.", + "type": "number" + }, + "initial_buffer": { + "description": "Specifies the number of individual documents that will be stored in memory on a shard before the initial bucketing algorithm is run.\nDefaults to `min(10 * shard_size, 50000)`.", + "type": "number" + }, + "script": { + "$ref": "#/components/schemas/_types.Script" } - }, - "required": [ - "field" - ] + } }, "_types.Refresh": { "type": "string", @@ -59097,1036 +59461,670 @@ } }, "required": [ - "_index" - ] - }, - "_global.termvectors.TermVector": { - "type": "object", - "properties": { - "field_statistics": { - "$ref": "#/components/schemas/_global.termvectors.FieldStatistics" - }, - "terms": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/_global.termvectors.Term" - } - } - }, - "required": [ - "terms" - ] - }, - "_global.termvectors.FieldStatistics": { - "type": "object", - "properties": { - "doc_count": { - "type": "number" - }, - "sum_doc_freq": { - "type": "number" - }, - "sum_ttf": { - "type": "number" - } - }, - "required": [ - "doc_count", - "sum_doc_freq", - "sum_ttf" - ] - }, - "_global.termvectors.Term": { - "type": "object", - "properties": { - "doc_freq": { - "type": "number" - }, - "score": { - "type": "number" - }, - "term_freq": { - "type": "number" - }, - "tokens": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.termvectors.Token" - } - }, - "ttf": { - "type": "number" - } - }, - "required": [ - "term_freq" - ] - }, - "_global.termvectors.Token": { - "type": "object", - "properties": { - "end_offset": { - "type": "number" - }, - "payload": { - "type": "string" - }, - "position": { - "type": "number" - }, - "start_offset": { - "type": "number" - } - }, - "required": [ - "position" - ] - }, - "query_rules._types.QueryRule": { - "type": "object", - "properties": { - "rule_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "type": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleType" - }, - "criteria": { - "description": "The criteria that must be met for the rule to be applied.\nIf multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.", - "oneOf": [ - { - "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" - } - } - ] - }, - "actions": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleActions" - }, - "priority": { - "type": "number" - } - }, - "required": [ - "rule_id", - "type", - "criteria", - "actions" - ] - }, - "query_rules._types.QueryRuleType": { - "type": "string", - "enum": [ - "pinned", - "exclude" - ] - }, - "query_rules._types.QueryRuleCriteria": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteriaType" - }, - "metadata": { - "description": "The metadata field to match against.\nThis metadata will be used to match against `match_criteria` sent in the rule.\nIt is required for all criteria types except `always`.", - "type": "string" - }, - "values": { - "description": "The values to match against the `metadata` field.\nOnly one value must match for the criteria to be met.\nIt is required for all criteria types except `always`.", - "type": "array", - "items": { - "type": "object" - } - } - }, - "required": [ - "type" - ] - }, - "query_rules._types.QueryRuleCriteriaType": { - "type": "string", - "enum": [ - "global", - "exact", - "exact_fuzzy", - "fuzzy", - "prefix", - "suffix", - "contains", - "lt", - "lte", - "gt", - "gte", - "always" - ] - }, - "query_rules._types.QueryRuleActions": { - "type": "object", - "properties": { - "ids": { - "description": "The unique document IDs of the documents to apply the rule to.\nOnly one of `ids` or `docs` may be specified and at least one must be specified.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.Id" - } - }, - "docs": { - "description": "The documents to apply the rule to.\nOnly one of `ids` or `docs` may be specified and at least one must be specified.\nThere is a maximum value of 100 documents in a rule.\nYou can specify the following attributes for each document:\n\n* `_index`: The index of the document to pin.\n* `_id`: The unique document ID.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.query_dsl.PinnedDoc" - } - } - } - }, - "query_rules._types.QueryRuleset": { - "type": "object", - "properties": { - "ruleset_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "rules": { - "description": "Rules associated with the query ruleset.", - "type": "array", - "items": { - "$ref": "#/components/schemas/query_rules._types.QueryRule" - } - } - }, - "required": [ - "ruleset_id", - "rules" + "_index" ] }, - "query_rules.list_rulesets.QueryRulesetListItem": { + "_global.termvectors.TermVector": { "type": "object", "properties": { - "ruleset_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "rule_total_count": { - "description": "The number of rules associated with the ruleset.", - "type": "number" - }, - "rule_criteria_types_counts": { - "description": "A map of criteria type (for example, `exact`) to the number of rules of that type.\n\nNOTE: The counts in `rule_criteria_types_counts` may be larger than the value of `rule_total_count` because a rule may have multiple criteria.", - "type": "object", - "additionalProperties": { - "type": "number" - } + "field_statistics": { + "$ref": "#/components/schemas/_global.termvectors.FieldStatistics" }, - "rule_type_counts": { - "description": "A map of rule type (for example, `pinned`) to the number of rules of that type.", + "terms": { "type": "object", "additionalProperties": { - "type": "number" + "$ref": "#/components/schemas/_global.termvectors.Term" } } }, "required": [ - "ruleset_id", - "rule_total_count", - "rule_criteria_types_counts", - "rule_type_counts" + "terms" ] }, - "query_rules.test.QueryRulesetMatchedRule": { + "_global.termvectors.FieldStatistics": { "type": "object", "properties": { - "ruleset_id": { - "$ref": "#/components/schemas/_types.Id" + "doc_count": { + "type": "number" }, - "rule_id": { - "$ref": "#/components/schemas/_types.Id" + "sum_doc_freq": { + "type": "number" + }, + "sum_ttf": { + "type": "number" } }, "required": [ - "ruleset_id", - "rule_id" + "doc_count", + "sum_doc_freq", + "sum_ttf" ] }, - "_global.rank_eval.RankEvalRequestItem": { + "_global.termvectors.Term": { "type": "object", "properties": { - "id": { - "$ref": "#/components/schemas/_types.Id" + "doc_freq": { + "type": "number" }, - "request": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalQuery" + "score": { + "type": "number" }, - "ratings": { - "description": "List of document ratings", + "term_freq": { + "type": "number" + }, + "tokens": { "type": "array", "items": { - "$ref": "#/components/schemas/_global.rank_eval.DocumentRating" - } - }, - "template_id": { - "$ref": "#/components/schemas/_types.Id" - }, - "params": { - "description": "The search template parameters.", - "type": "object", - "additionalProperties": { - "type": "object" + "$ref": "#/components/schemas/_global.termvectors.Token" } - } - }, - "required": [ - "id", - "ratings" - ] - }, - "_global.rank_eval.RankEvalQuery": { - "type": "object", - "properties": { - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" }, - "size": { + "ttf": { "type": "number" } }, "required": [ - "query" + "term_freq" ] }, - "_global.rank_eval.DocumentRating": { + "_global.termvectors.Token": { "type": "object", "properties": { - "_id": { - "$ref": "#/components/schemas/_types.Id" + "end_offset": { + "type": "number" }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "payload": { + "type": "string" }, - "rating": { - "description": "The document’s relevance with regard to this search request.", + "position": { + "type": "number" + }, + "start_offset": { "type": "number" } }, "required": [ - "_id", - "_index", - "rating" + "position" ] }, - "_global.rank_eval.RankEvalMetric": { + "query_rules._types.QueryRule": { "type": "object", "properties": { - "precision": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricPrecision" - }, - "recall": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRecall" + "rule_id": { + "$ref": "#/components/schemas/_types.Id" }, - "mean_reciprocal_rank": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricMeanReciprocalRank" + "type": { + "$ref": "#/components/schemas/query_rules._types.QueryRuleType" }, - "dcg": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricDiscountedCumulativeGain" + "criteria": { + "description": "The criteria that must be met for the rule to be applied.\nIf multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.", + "oneOf": [ + { + "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteria" + } + } + ] }, - "expected_reciprocal_rank": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricExpectedReciprocalRank" - } - } - }, - "_global.rank_eval.RankEvalMetricPrecision": { - "description": "Precision at K (P@k)", - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" + "actions": { + "$ref": "#/components/schemas/query_rules._types.QueryRuleActions" }, - { - "type": "object", - "properties": { - "ignore_unlabeled": { - "description": "Controls how unlabeled documents in the search results are counted. If set to true, unlabeled documents are ignored and neither count as relevant or irrelevant. Set to false (the default), they are treated as irrelevant.", - "type": "boolean" - } - } + "priority": { + "type": "number" } + }, + "required": [ + "rule_id", + "type", + "criteria", + "actions" ] }, - "_global.rank_eval.RankEvalMetricRatingTreshold": { - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" - }, - { - "type": "object", - "properties": { - "relevant_rating_threshold": { - "description": "Sets the rating threshold above which documents are considered to be \"relevant\".", - "type": "number" - } - } - } + "query_rules._types.QueryRuleType": { + "type": "string", + "enum": [ + "pinned", + "exclude" ] }, - "_global.rank_eval.RankEvalMetricBase": { + "query_rules._types.QueryRuleCriteria": { "type": "object", "properties": { - "k": { - "description": "Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query.", - "type": "number" - } - } - }, - "_global.rank_eval.RankEvalMetricRecall": { - "description": "Recall at K (R@k)", - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" - }, - { - "type": "object" - } - ] - }, - "_global.rank_eval.RankEvalMetricMeanReciprocalRank": { - "description": "Mean Reciprocal Rank", - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" - }, - { - "type": "object" - } - ] - }, - "_global.rank_eval.RankEvalMetricDiscountedCumulativeGain": { - "description": "Discounted cumulative gain (DCG)", - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" + "type": { + "$ref": "#/components/schemas/query_rules._types.QueryRuleCriteriaType" }, - { - "type": "object", - "properties": { - "normalize": { - "description": "If set to true, this metric will calculate the Normalized DCG.", - "type": "boolean" - } - } - } - ] - }, - "_global.rank_eval.RankEvalMetricExpectedReciprocalRank": { - "description": "Expected Reciprocal Rank (ERR)", - "allOf": [ - { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" + "metadata": { + "description": "The metadata field to match against.\nThis metadata will be used to match against `match_criteria` sent in the rule.\nIt is required for all criteria types except `always`.", + "type": "string" }, - { - "type": "object", - "properties": { - "maximum_relevance": { - "description": "The highest relevance grade used in the user-supplied relevance judgments.", - "type": "number" - } - }, - "required": [ - "maximum_relevance" - ] + "values": { + "description": "The values to match against the `metadata` field.\nOnly one value must match for the criteria to be met.\nIt is required for all criteria types except `always`.", + "type": "array", + "items": { + "type": "object" + } } + }, + "required": [ + "type" ] }, - "_global.rank_eval.RankEvalMetricDetail": { + "query_rules._types.QueryRuleCriteriaType": { + "type": "string", + "enum": [ + "global", + "exact", + "exact_fuzzy", + "fuzzy", + "prefix", + "suffix", + "contains", + "lt", + "lte", + "gt", + "gte", + "always" + ] + }, + "query_rules._types.QueryRuleActions": { "type": "object", "properties": { - "metric_score": { - "description": "The metric_score in the details section shows the contribution of this query to the global quality metric score", - "type": "number" - }, - "unrated_docs": { - "description": "The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents", + "ids": { + "description": "The unique document IDs of the documents to apply the rule to.\nOnly one of `ids` or `docs` may be specified and at least one must be specified.", "type": "array", "items": { - "$ref": "#/components/schemas/_global.rank_eval.UnratedDocument" + "$ref": "#/components/schemas/_types.Id" } }, - "hits": { - "description": "The hits section shows a grouping of the search results with their supplied ratings", + "docs": { + "description": "The documents to apply the rule to.\nOnly one of `ids` or `docs` may be specified and at least one must be specified.\nThere is a maximum value of 100 documents in a rule.\nYou can specify the following attributes for each document:\n\n* `_index`: The index of the document to pin.\n* `_id`: The unique document ID.", "type": "array", "items": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalHitItem" - } - }, - "metric_details": { - "description": "The metric_details give additional information about the calculated quality metric (e.g. how many of the retrieved documents were relevant). The content varies for each metric but allows for better interpretation of the results", - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/_types.query_dsl.PinnedDoc" } } - }, - "required": [ - "metric_score", - "unrated_docs", - "hits", - "metric_details" - ] + } }, - "_global.rank_eval.UnratedDocument": { + "query_rules._types.QueryRuleset": { "type": "object", "properties": { - "_id": { + "ruleset_id": { "$ref": "#/components/schemas/_types.Id" }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" + "rules": { + "description": "Rules associated with the query ruleset.", + "type": "array", + "items": { + "$ref": "#/components/schemas/query_rules._types.QueryRule" + } } }, "required": [ - "_id", - "_index" + "ruleset_id", + "rules" ] }, - "_global.rank_eval.RankEvalHitItem": { + "query_rules.list_rulesets.QueryRulesetListItem": { "type": "object", "properties": { - "hit": { - "$ref": "#/components/schemas/_global.rank_eval.RankEvalHit" + "ruleset_id": { + "$ref": "#/components/schemas/_types.Id" }, - "rating": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] + "rule_total_count": { + "description": "The number of rules associated with the ruleset.", + "type": "number" + }, + "rule_criteria_types_counts": { + "description": "A map of criteria type (for example, `exact`) to the number of rules of that type.\n\nNOTE: The counts in `rule_criteria_types_counts` may be larger than the value of `rule_total_count` because a rule may have multiple criteria.", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "rule_type_counts": { + "description": "A map of rule type (for example, `pinned`) to the number of rules of that type.", + "type": "object", + "additionalProperties": { + "type": "number" + } } }, "required": [ - "hit" + "ruleset_id", + "rule_total_count", + "rule_criteria_types_counts", + "rule_type_counts" ] }, - "_global.rank_eval.RankEvalHit": { + "query_rules.test.QueryRulesetMatchedRule": { "type": "object", "properties": { - "_id": { + "ruleset_id": { "$ref": "#/components/schemas/_types.Id" }, - "_index": { - "$ref": "#/components/schemas/_types.IndexName" - }, - "_score": { - "type": "number" + "rule_id": { + "$ref": "#/components/schemas/_types.Id" } }, "required": [ - "_id", - "_index", - "_score" + "ruleset_id", + "rule_id" ] }, - "_global.reindex.Destination": { + "_global.rank_eval.RankEvalRequestItem": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.IndexName" + "id": { + "$ref": "#/components/schemas/_types.Id" }, - "op_type": { - "$ref": "#/components/schemas/_types.OpType" + "request": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalQuery" }, - "pipeline": { - "description": "The name of the pipeline to use.", - "type": "string" + "ratings": { + "description": "List of document ratings", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.rank_eval.DocumentRating" + } }, - "routing": { - "$ref": "#/components/schemas/_types.Routing" + "template_id": { + "$ref": "#/components/schemas/_types.Id" }, - "version_type": { - "$ref": "#/components/schemas/_types.VersionType" + "params": { + "description": "The search template parameters.", + "type": "object", + "additionalProperties": { + "type": "object" + } } }, "required": [ - "index" + "id", + "ratings" ] }, - "_global.reindex.Source": { + "_global.rank_eval.RankEvalQuery": { "type": "object", "properties": { - "index": { - "$ref": "#/components/schemas/_types.Indices" - }, "query": { "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" }, - "remote": { - "$ref": "#/components/schemas/_global.reindex.RemoteSource" - }, "size": { - "description": "The number of documents to index per batch.\nUse it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.", "type": "number" - }, - "slice": { - "$ref": "#/components/schemas/_types.SlicedScroll" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "_source": { - "$ref": "#/components/schemas/_types.Fields" - }, - "runtime_mappings": { - "$ref": "#/components/schemas/_types.mapping.RuntimeFields" - } - }, - "required": [ - "index" - ] - }, - "_global.reindex.RemoteSource": { - "type": "object", - "properties": { - "connect_timeout": { - "$ref": "#/components/schemas/_types.Duration" - }, - "headers": { - "description": "An object containing the headers of the request.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "host": { - "$ref": "#/components/schemas/_types.Host" - }, - "username": { - "$ref": "#/components/schemas/_types.Username" - }, - "password": { - "$ref": "#/components/schemas/_types.Password" - }, - "socket_timeout": { - "$ref": "#/components/schemas/_types.Duration" } }, "required": [ - "host" - ] - }, - "_types.Host": { - "type": "string" - }, - "_types.Username": { - "type": "string" - }, - "_types.Password": { - "type": "string" - }, - "_global.scripts_painless_execute.PainlessContext": { - "type": "string", - "enum": [ - "painless_test", - "filter", - "score", - "boolean_field", - "date_field", - "double_field", - "geo_point_field", - "ip_field", - "keyword_field", - "long_field", - "composite_field" + "query" ] }, - "_global.scripts_painless_execute.PainlessContextSetup": { + "_global.rank_eval.DocumentRating": { "type": "object", "properties": { - "document": { - "description": "Document that's temporarily indexed in-memory and accessible from the script.", - "type": "object" + "_id": { + "$ref": "#/components/schemas/_types.Id" }, - "index": { + "_index": { "$ref": "#/components/schemas/_types.IndexName" }, - "query": { - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + "rating": { + "description": "The document’s relevance with regard to this search request.", + "type": "number" } }, "required": [ - "document", - "index" + "_id", + "_index", + "rating" ] }, - "_types.RetrieverContainer": { + "_global.rank_eval.RankEvalMetric": { "type": "object", "properties": { - "standard": { - "$ref": "#/components/schemas/_types.StandardRetriever" - }, - "knn": { - "$ref": "#/components/schemas/_types.KnnRetriever" - }, - "rrf": { - "$ref": "#/components/schemas/_types.RRFRetriever" + "precision": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricPrecision" }, - "text_similarity_reranker": { - "$ref": "#/components/schemas/_types.TextSimilarityReranker" + "recall": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRecall" }, - "rule": { - "$ref": "#/components/schemas/_types.RuleRetriever" + "mean_reciprocal_rank": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricMeanReciprocalRank" }, - "rescorer": { - "$ref": "#/components/schemas/_types.RescorerRetriever" + "dcg": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricDiscountedCumulativeGain" }, - "linear": { - "$ref": "#/components/schemas/_types.LinearRetriever" + "expected_reciprocal_rank": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricExpectedReciprocalRank" + } + } + }, + "_global.rank_eval.RankEvalMetricPrecision": { + "description": "Precision at K (P@k)", + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" }, - "pinned": { - "$ref": "#/components/schemas/_types.PinnedRetriever" + { + "type": "object", + "properties": { + "ignore_unlabeled": { + "description": "Controls how unlabeled documents in the search results are counted. If set to true, unlabeled documents are ignored and neither count as relevant or irrelevant. Set to false (the default), they are treated as irrelevant.", + "type": "boolean" + } + } } - }, - "minProperties": 1, - "maxProperties": 1 + ] }, - "_types.StandardRetriever": { + "_global.rank_eval.RankEvalMetricRatingTreshold": { "allOf": [ { - "$ref": "#/components/schemas/_types.RetrieverBase" + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" }, { "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.", + "relevant_rating_threshold": { + "description": "Sets the rating threshold above which documents are considered to be \"relevant\".", "type": "number" - }, - "sort": { - "$ref": "#/components/schemas/_types.Sort" - }, - "collapse": { - "$ref": "#/components/schemas/_global.search._types.FieldCollapse" } } } ] }, - "_types.RetrieverBase": { + "_global.rank_eval.RankEvalMetricBase": { "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.", + "k": { + "description": "Sets the maximum number of documents retrieved per query. This value will act in place of the usual size parameter in the query.", "type": "number" - }, - "_name": { - "description": "Retriever name.", - "type": "string" } } }, - "_types.KnnRetriever": { + "_global.rank_eval.RankEvalMetricRecall": { + "description": "Recall at K (R@k)", "allOf": [ { - "$ref": "#/components/schemas/_types.RetrieverBase" + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" }, { - "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" - ] + "type": "object" } ] }, - "_types.RRFRetriever": { + "_global.rank_eval.RankEvalMetricMeanReciprocalRank": { + "description": "Mean Reciprocal Rank", "allOf": [ { - "$ref": "#/components/schemas/_types.RetrieverBase" + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold" + }, + { + "type": "object" + } + ] + }, + "_global.rank_eval.RankEvalMetricDiscountedCumulativeGain": { + "description": "Discounted cumulative gain (DCG)", + "allOf": [ + { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" }, { "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" + "normalize": { + "description": "If set to true, this metric will calculate the Normalized DCG.", + "type": "boolean" } - }, - "required": [ - "retrievers" - ] + } } ] }, - "_types.TextSimilarityReranker": { + "_global.rank_eval.RankEvalMetricExpectedReciprocalRank": { + "description": "Expected Reciprocal Rank (ERR)", "allOf": [ { - "$ref": "#/components/schemas/_types.RetrieverBase" + "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase" }, { "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.", + "maximum_relevance": { + "description": "The highest relevance grade used in the user-supplied relevance judgments.", "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" + "maximum_relevance" ] } ] }, - "_types.RuleRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.RetrieverBase" + "_global.rank_eval.RankEvalMetricDetail": { + "type": "object", + "properties": { + "metric_score": { + "description": "The metric_score in the details section shows the contribution of this query to the global quality metric score", + "type": "number" }, - { + "unrated_docs": { + "description": "The unrated_docs section contains an _index and _id entry for each document in the search result for this query that didn’t have a ratings value. This can be used to ask the user to supply ratings for these documents", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.rank_eval.UnratedDocument" + } + }, + "hits": { + "description": "The hits section shows a grouping of the search results with their supplied ratings", + "type": "array", + "items": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalHitItem" + } + }, + "metric_details": { + "description": "The metric_details give additional information about the calculated quality metric (e.g. how many of the retrieved documents were relevant). The content varies for each metric but allows for better interpretation of the results", "type": "object", - "properties": { - "ruleset_ids": { - "description": "The ruleset IDs containing the rules this retriever is evaluating against.", - "oneOf": [ - { - "$ref": "#/components/schemas/_types.Id" - }, - { - "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" + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object" } - }, - "required": [ - "ruleset_ids", - "match_criteria", - "retriever" - ] + } } + }, + "required": [ + "metric_score", + "unrated_docs", + "hits", + "metric_details" ] }, - "_types.RescorerRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.RetrieverBase" + "_global.rank_eval.UnratedDocument": { + "type": "object", + "properties": { + "_id": { + "$ref": "#/components/schemas/_types.Id" }, - { - "type": "object", - "properties": { - "retriever": { - "$ref": "#/components/schemas/_types.RetrieverContainer" - }, - "rescore": { - "oneOf": [ - { - "$ref": "#/components/schemas/_global.search._types.Rescore" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/_global.search._types.Rescore" - } - } - ] - } - }, - "required": [ - "retriever", - "rescore" - ] + "_index": { + "$ref": "#/components/schemas/_types.IndexName" } + }, + "required": [ + "_id", + "_index" ] }, - "_types.LinearRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.RetrieverBase" + "_global.rank_eval.RankEvalHitItem": { + "type": "object", + "properties": { + "hit": { + "$ref": "#/components/schemas/_global.rank_eval.RankEvalHit" }, - { - "type": "object", - "properties": { - "retrievers": { - "description": "Inner retrievers.", - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.InnerRetriever" - } - }, - "rank_window_size": { + "rating": { + "oneOf": [ + { "type": "number" + }, + { + "nullable": true, + "type": "string" } - }, - "required": [ - "rank_window_size" ] } + }, + "required": [ + "hit" ] }, - "_types.InnerRetriever": { + "_global.rank_eval.RankEvalHit": { "type": "object", "properties": { - "retriever": { - "$ref": "#/components/schemas/_types.RetrieverContainer" + "_id": { + "$ref": "#/components/schemas/_types.Id" }, - "weight": { + "_index": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "_score": { "type": "number" + } + }, + "required": [ + "_id", + "_index", + "_score" + ] + }, + "_global.reindex.Destination": { + "type": "object", + "properties": { + "index": { + "$ref": "#/components/schemas/_types.IndexName" }, - "normalizer": { - "$ref": "#/components/schemas/_types.ScoreNormalizer" + "op_type": { + "$ref": "#/components/schemas/_types.OpType" + }, + "pipeline": { + "description": "The name of the pipeline to use.", + "type": "string" + }, + "routing": { + "$ref": "#/components/schemas/_types.Routing" + }, + "version_type": { + "$ref": "#/components/schemas/_types.VersionType" } }, "required": [ - "retriever", - "weight", - "normalizer" + "index" ] }, - "_types.ScoreNormalizer": { - "type": "string", - "enum": [ - "none", - "minmax", - "l2_norm" + "_global.reindex.Source": { + "type": "object", + "properties": { + "index": { + "$ref": "#/components/schemas/_types.Indices" + }, + "query": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" + }, + "remote": { + "$ref": "#/components/schemas/_global.reindex.RemoteSource" + }, + "size": { + "description": "The number of documents to index per batch.\nUse it when you are indexing from remote to ensure that the batches fit within the on-heap buffer, which defaults to a maximum size of 100 MB.", + "type": "number" + }, + "slice": { + "$ref": "#/components/schemas/_types.SlicedScroll" + }, + "sort": { + "$ref": "#/components/schemas/_types.Sort" + }, + "_source": { + "$ref": "#/components/schemas/_types.Fields" + }, + "runtime_mappings": { + "$ref": "#/components/schemas/_types.mapping.RuntimeFields" + } + }, + "required": [ + "index" ] }, - "_types.PinnedRetriever": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.RetrieverBase" + "_global.reindex.RemoteSource": { + "type": "object", + "properties": { + "connect_timeout": { + "$ref": "#/components/schemas/_types.Duration" }, - { + "headers": { + "description": "An object containing the headers of the request.", "type": "object", - "properties": { - "retriever": { - "$ref": "#/components/schemas/_types.RetrieverContainer" - }, - "ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "docs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types.SpecifiedDocument" - } - }, - "rank_window_size": { - "type": "number" - } - }, - "required": [ - "retriever", - "rank_window_size" - ] + "additionalProperties": { + "type": "string" + } + }, + "host": { + "$ref": "#/components/schemas/_types.Host" + }, + "username": { + "$ref": "#/components/schemas/_types.Username" + }, + "password": { + "$ref": "#/components/schemas/_types.Password" + }, + "socket_timeout": { + "$ref": "#/components/schemas/_types.Duration" } + }, + "required": [ + "host" ] }, - "_types.SpecifiedDocument": { + "_types.Host": { + "type": "string" + }, + "_types.Username": { + "type": "string" + }, + "_types.Password": { + "type": "string" + }, + "_global.scripts_painless_execute.PainlessContext": { + "type": "string", + "enum": [ + "painless_test", + "filter", + "score", + "boolean_field", + "date_field", + "double_field", + "geo_point_field", + "ip_field", + "keyword_field", + "long_field", + "composite_field" + ] + }, + "_global.scripts_painless_execute.PainlessContextSetup": { "type": "object", "properties": { + "document": { + "description": "Document that's temporarily indexed in-memory and accessible from the script.", + "type": "object" + }, "index": { "$ref": "#/components/schemas/_types.IndexName" }, - "id": { - "$ref": "#/components/schemas/_types.Id" + "query": { + "$ref": "#/components/schemas/_types.query_dsl.QueryContainer" } }, "required": [ - "id" + "document", + "index" ] }, "search_application._types.SearchApplication": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 21a8542528..99e6fac39c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -53029,7 +53029,7 @@ }, { "name": "rank_window_size", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -54052,7 +54052,7 @@ }, { "name": "rank_window_size", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -57176,7 +57176,7 @@ { "description": "The text snippet used as the basis for similarity comparison", "name": "inference_text", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -57188,7 +57188,7 @@ { "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, + "required": true, "type": { "kind": "instance_of", "type": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index e46061c88d..7859d3f6df 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2559,7 +2559,7 @@ export type LifecycleOperationMode = 'RUNNING' | 'STOPPING' | 'STOPPED' export interface LinearRetriever extends RetrieverBase { retrievers?: InnerRetriever[] - rank_window_size: integer + rank_window_size?: integer } export type MapboxVectorTiles = ArrayBuffer @@ -2654,7 +2654,7 @@ export interface PinnedRetriever extends RetrieverBase { retriever: RetrieverContainer ids?: string[] docs?: SpecifiedDocument[] - rank_window_size: integer + rank_window_size?: integer } export type PipelineName = string @@ -2989,8 +2989,8 @@ export interface TextSimilarityReranker extends RetrieverBase { retriever: RetrieverContainer rank_window_size?: integer inference_id?: string - inference_text?: string - field?: string + inference_text: string + field: string } export type ThreadType = 'cpu' | 'wait' | 'block' | 'gpu' | 'mem' diff --git a/specification/_types/Retriever.ts b/specification/_types/Retriever.ts index 5faf785e03..8a93d125fd 100644 --- a/specification/_types/Retriever.ts +++ b/specification/_types/Retriever.ts @@ -68,7 +68,7 @@ export class RescorerRetriever extends RetrieverBase { export class LinearRetriever extends RetrieverBase { /** Inner retrievers. */ retrievers?: InnerRetriever[] - rank_window_size: integer + rank_window_size?: integer } export class PinnedRetriever extends RetrieverBase { @@ -76,7 +76,7 @@ export class PinnedRetriever extends RetrieverBase { retriever: RetrieverContainer ids?: string[] docs?: SpecifiedDocument[] - rank_window_size: integer + rank_window_size?: integer } export class InnerRetriever { @@ -146,9 +146,9 @@ export class TextSimilarityReranker extends RetrieverBase { /** Unique identifier of the inference endpoint created using the inference API. */ inference_id?: string /** The text snippet used as the basis for similarity comparison */ - inference_text?: string + inference_text: string /** The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text */ - field?: string + field: string } export class RuleRetriever extends RetrieverBase {