From 77188973f762fba3e27d2392e400aaadb38d1e9e Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 28 Mar 2025 20:16:47 +0400 Subject: [PATCH] Add max_concurrent_shard_requests to open PIT API (#4142) (cherry picked from commit 61386731456bd3499b38fa019cd30646cee54139) --- output/openapi/elasticsearch-openapi.json | 10 ++++++++++ .../openapi/elasticsearch-serverless-openapi.json | 10 ++++++++++ output/schema/schema-serverless.json | 15 ++++++++++++++- output/schema/schema.json | 15 ++++++++++++++- output/schema/validation-errors.json | 6 ++++++ output/typescript/types.ts | 1 + .../open_point_in_time/OpenPointInTimeRequest.ts | 6 ++++++ 7 files changed, 61 insertions(+), 2 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 9d3a85e1a0..dacc68187b 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -29153,6 +29153,16 @@ "type": "boolean" }, "style": "form" + }, + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" } ], "requestBody": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 53dc1a009d..7da05d672a 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -17481,6 +17481,16 @@ "type": "boolean" }, "style": "form" + }, + { + "in": "query", + "name": "max_concurrent_shard_requests", + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" } ], "requestBody": { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index d12c97803c..ac2904f619 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -40469,9 +40469,22 @@ "namespace": "_builtins" } } + }, + { + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "name": "max_concurrent_shard_requests", + "required": false, + "serverDefault": 5, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } } ], - "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L121" + "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L26-L127" }, { "body": { diff --git a/output/schema/schema.json b/output/schema/schema.json index b467cfe558..47e44ae3e0 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -33028,9 +33028,22 @@ "namespace": "_builtins" } } + }, + { + "description": "Maximum number of concurrent shard requests that each sub-search request executes per node.", + "name": "max_concurrent_shard_requests", + "required": false, + "serverDefault": 5, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } } ], - "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L121" + "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L26-L127" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 3aefa05c9f..fcbd20f61f 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -313,6 +313,12 @@ ], "response": [] }, + "open_point_in_time": { + "request": [ + "Request: query parameter 'max_concurrent_shard_requests' does not exist in the json spec" + ], + "response": [] + }, "reindex": { "request": [ "Request: query parameter 'require_alias' does not exist in the json spec", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 9d825d38ec..b957e3050a 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -909,6 +909,7 @@ export interface OpenPointInTimeRequest extends RequestBase { routing?: Routing expand_wildcards?: ExpandWildcards allow_partial_search_results?: boolean + max_concurrent_shard_requests?: integer body?: { index_filter?: QueryDslQueryContainer } diff --git a/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts b/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts index 0384ab2ab9..1a8b42c4d2 100644 --- a/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts +++ b/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { ExpandWildcards, Indices, Routing } from '@_types/common' +import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' import { Duration } from '@_types/Time' @@ -111,6 +112,11 @@ export interface Request extends RequestBase { * @server_default false */ allow_partial_search_results?: boolean + /** + * Maximum number of concurrent shard requests that each sub-search request executes per node. + * @server_default 5 + */ + max_concurrent_shard_requests?: integer } body: { /**