From eeccfcf53563a824e79e998ff63fd50017009bf1 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 21 Jul 2025 12:48:56 +0400 Subject: [PATCH] Add missing index query parameter to msearch (#4980) (cherry picked from commit c7bfb98f4bfdd35f46328641a61a3d1223cfd08e) # Conflicts: # output/schema/schema.json # output/schema/validation-errors.json --- output/openapi/elasticsearch-openapi.json | 22 +++++++++++++++++++ .../elasticsearch-serverless-openapi.json | 22 +++++++++++++++++++ output/schema/schema.json | 14 +++++++++++- output/schema/validation-errors.json | 1 + .../_global/msearch/MultiSearchRequest.ts | 4 ++++ 5 files changed, 62 insertions(+), 1 deletion(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index ddd0ab8e87..d0964b1520 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -31075,6 +31075,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -31139,6 +31142,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -31208,6 +31214,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -31275,6 +31284,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -120545,6 +120557,16 @@ }, "style": "form" }, + "msearch-index_": { + "in": "query", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases to use as default", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" + }, "msearch-max_concurrent_searches": { "in": "query", "name": "max_concurrent_searches", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 9827459d42..9b6a94864f 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -19061,6 +19061,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -19125,6 +19128,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -19194,6 +19200,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -19261,6 +19270,9 @@ { "$ref": "#/components/parameters/msearch-include_named_queries_score" }, + { + "$ref": "#/components/parameters/msearch-index_" + }, { "$ref": "#/components/parameters/msearch-max_concurrent_searches" }, @@ -71818,6 +71830,16 @@ }, "style": "form" }, + "msearch-index_": { + "in": "query", + "name": "index", + "description": "Comma-separated list of data streams, indices, and index aliases to use as default", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "form" + }, "msearch-max_concurrent_searches": { "in": "query", "name": "max_concurrent_searches", diff --git a/output/schema/schema.json b/output/schema/schema.json index 01a1b92599..46bc43cf16 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -33090,6 +33090,18 @@ } } }, + { + "description": "Comma-separated list of data streams, indices, and index aliases to use as default", + "name": "index", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Indices", + "namespace": "_types" + } + } + }, { "description": "Maximum number of concurrent searches the multi search API can execute.", "name": "max_concurrent_searches", @@ -33177,7 +33189,7 @@ } } ], - "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L135" + "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L139" }, { "kind": "type_alias", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 42b7869fdd..c6cbd29002 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -251,6 +251,7 @@ "Request: query parameter 'ignore_throttled' does not exist in the json spec", "Request: query parameter 'ignore_unavailable' does not exist in the json spec", "Request: query parameter 'include_named_queries_score' does not exist in the json spec", + "Request: query parameter 'index' does not exist in the json spec", "Request: query parameter 'routing' does not exist in the json spec" ], "response": [] diff --git a/specification/_global/msearch/MultiSearchRequest.ts b/specification/_global/msearch/MultiSearchRequest.ts index 96081977dd..69366b44fc 100644 --- a/specification/_global/msearch/MultiSearchRequest.ts +++ b/specification/_global/msearch/MultiSearchRequest.ts @@ -99,6 +99,10 @@ export interface Request extends RequestBase { * @server_default false */ include_named_queries_score?: boolean + /** + * Comma-separated list of data streams, indices, and index aliases to use as default + */ + index?: Indices /** * Maximum number of concurrent searches the multi search API can execute. */