From 2b9b67eeea7f23947565c37f1c9935c32a1ad953 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Thu, 27 Mar 2025 10:33:29 +0400 Subject: [PATCH 1/2] Add max_concurrent_shard_requests to open PIT API --- output/openapi/elasticsearch-openapi.json | 12 ++++++- .../elasticsearch-serverless-openapi.json | 12 ++++++- output/schema/schema-serverless.json | 27 +++++++++++---- output/schema/schema.json | 33 +++++++++++++------ output/schema/validation-errors.json | 6 ++++ output/typescript/types.ts | 15 +++++---- .../_global/msearch/MultiSearchRequest.ts | 7 ++-- .../OpenPointInTimeRequest.ts | 6 ++++ specification/_global/search/SearchRequest.ts | 2 +- .../submit/AsyncSearchSubmitRequest.ts | 2 +- .../fleet/msearch/MultiSearchRequest.ts | 6 ++-- specification/fleet/search/SearchRequest.ts | 2 +- 12 files changed, 95 insertions(+), 35 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 4325072d33..62a6ae1e27 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -29079,6 +29079,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": { @@ -111293,7 +111303,7 @@ "msearch#max_concurrent_searches": { "in": "query", "name": "max_concurrent_searches", - "description": "Maximum number of concurrent searches the multi search API can execute.", + "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", "deprecated": false, "schema": { "type": "number" diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 443963ecbc..3915e8d730 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -17273,6 +17273,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": { @@ -66181,7 +66191,7 @@ "msearch#max_concurrent_searches": { "in": "query", "name": "max_concurrent_searches", - "description": "Maximum number of concurrent searches the multi search API can execute.", + "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", "deprecated": false, "schema": { "type": "number" diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index a071a6b927..fc6c0e2273 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -12474,7 +12474,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -39300,13 +39300,13 @@ } }, { - "description": "Maximum number of concurrent searches the multi search API can execute.", + "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", "name": "max_concurrent_searches", "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -39319,7 +39319,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -39386,7 +39386,7 @@ } } ], - "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L135" + "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L136" }, { "body": { @@ -39961,9 +39961,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": { @@ -42736,7 +42749,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } diff --git a/output/schema/schema.json b/output/schema/schema.json index 5cca615601..468c9b7f1a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -31949,13 +31949,13 @@ } }, { - "description": "Maximum number of concurrent searches the multi search API can execute.", + "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", "name": "max_concurrent_searches", "required": false, "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -31968,7 +31968,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -32035,7 +32035,7 @@ } } ], - "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L135" + "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L136" }, { "kind": "type_alias", @@ -33062,9 +33062,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", @@ -36592,7 +36605,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -92796,7 +92809,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -126202,7 +126215,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -126215,7 +126228,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -126979,7 +126992,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index babdec33d1..f3ce6357e0 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -80,6 +80,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 51f16d16c4..fd274ba3e5 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -823,8 +823,8 @@ export interface MsearchRequest extends RequestBase { ignore_throttled?: boolean ignore_unavailable?: boolean include_named_queries_score?: boolean - max_concurrent_searches?: long - max_concurrent_shard_requests?: long + max_concurrent_searches?: integer + max_concurrent_shard_requests?: integer pre_filter_shard_size?: long rest_total_hits_as_int?: boolean routing?: Routing @@ -919,6 +919,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 } @@ -1211,7 +1212,7 @@ export interface SearchRequest extends RequestBase { ignore_unavailable?: boolean include_named_queries_score?: boolean lenient?: boolean - max_concurrent_shard_requests?: long + max_concurrent_shard_requests?: integer preference?: string pre_filter_shard_size?: long request_cache?: boolean @@ -6833,7 +6834,7 @@ export interface AsyncSearchSubmitRequest extends RequestBase { ignore_throttled?: boolean ignore_unavailable?: boolean lenient?: boolean - max_concurrent_shard_requests?: long + max_concurrent_shard_requests?: integer preference?: string request_cache?: boolean routing?: Routing @@ -10706,8 +10707,8 @@ export interface FleetMsearchRequest extends RequestBase { expand_wildcards?: ExpandWildcards ignore_throttled?: boolean ignore_unavailable?: boolean - max_concurrent_searches?: long - max_concurrent_shard_requests?: long + max_concurrent_searches?: integer + max_concurrent_shard_requests?: integer pre_filter_shard_size?: long search_type?: SearchType rest_total_hits_as_int?: boolean @@ -10736,7 +10737,7 @@ export interface FleetSearchRequest extends RequestBase { ignore_throttled?: boolean ignore_unavailable?: boolean lenient?: boolean - max_concurrent_shard_requests?: long + max_concurrent_shard_requests?: integer preference?: string pre_filter_shard_size?: long request_cache?: boolean diff --git a/specification/_global/msearch/MultiSearchRequest.ts b/specification/_global/msearch/MultiSearchRequest.ts index 96081977dd..c448fb7181 100644 --- a/specification/_global/msearch/MultiSearchRequest.ts +++ b/specification/_global/msearch/MultiSearchRequest.ts @@ -19,7 +19,7 @@ import { RequestBase } from '@_types/Base' import { ExpandWildcards, Indices, Routing, SearchType } from '@_types/common' -import { long } from '@_types/Numeric' +import { integer, long } from '@_types/Numeric' import { RequestItem } from './types' /** @@ -101,13 +101,14 @@ export interface Request extends RequestBase { include_named_queries_score?: boolean /** * Maximum number of concurrent searches the multi search API can execute. + * Defaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`. */ - max_concurrent_searches?: long + max_concurrent_searches?: integer /** * Maximum number of concurrent shard requests that each sub-search request executes per node. * @server_default 5 */ - max_concurrent_shard_requests?: long + max_concurrent_shard_requests?: integer /** * Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. */ 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: { /** diff --git a/specification/_global/search/SearchRequest.ts b/specification/_global/search/SearchRequest.ts index 895e970d02..bd277f77cc 100644 --- a/specification/_global/search/SearchRequest.ts +++ b/specification/_global/search/SearchRequest.ts @@ -195,7 +195,7 @@ export interface Request extends RequestBase { * This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. * @server_default 5 */ - max_concurrent_shard_requests?: long + max_concurrent_shard_requests?: integer /** * The nodes and shards used for the search. * By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. diff --git a/specification/async_search/submit/AsyncSearchSubmitRequest.ts b/specification/async_search/submit/AsyncSearchSubmitRequest.ts index 86e60bc5fd..62b1d3ecca 100644 --- a/specification/async_search/submit/AsyncSearchSubmitRequest.ts +++ b/specification/async_search/submit/AsyncSearchSubmitRequest.ts @@ -124,7 +124,7 @@ export interface Request extends RequestBase { ignore_throttled?: boolean ignore_unavailable?: boolean lenient?: boolean - max_concurrent_shard_requests?: long + max_concurrent_shard_requests?: integer preference?: string /** @server_default true */ request_cache?: boolean diff --git a/specification/fleet/msearch/MultiSearchRequest.ts b/specification/fleet/msearch/MultiSearchRequest.ts index 4ba51f62af..931572dada 100644 --- a/specification/fleet/msearch/MultiSearchRequest.ts +++ b/specification/fleet/msearch/MultiSearchRequest.ts @@ -25,7 +25,7 @@ import { IndexName, SearchType } from '@_types/common' -import { long } from '@_types/Numeric' +import { integer, long } from '@_types/Numeric' import { Checkpoint } from '../_types/Checkpoints' /** @@ -84,12 +84,12 @@ export interface Request extends RequestBase { /** * Maximum number of concurrent searches the multi search API can execute. */ - max_concurrent_searches?: long + max_concurrent_searches?: integer /** * Maximum number of concurrent shard requests that each sub-search request executes per node. * @server_default 5 */ - max_concurrent_shard_requests?: long + max_concurrent_shard_requests?: integer /** * Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. */ diff --git a/specification/fleet/search/SearchRequest.ts b/specification/fleet/search/SearchRequest.ts index ce816fa7f1..5883cf8a7d 100644 --- a/specification/fleet/search/SearchRequest.ts +++ b/specification/fleet/search/SearchRequest.ts @@ -88,7 +88,7 @@ export interface Request extends RequestBase { ignore_throttled?: boolean ignore_unavailable?: boolean lenient?: boolean - max_concurrent_shard_requests?: long + max_concurrent_shard_requests?: integer preference?: string pre_filter_shard_size?: long request_cache?: boolean From 7532901dcb35b92ea222f575a953b40a1920e583 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 28 Mar 2025 16:22:39 +0400 Subject: [PATCH 2/2] Revert long -> int changes --- output/openapi/elasticsearch-openapi.json | 2 +- .../elasticsearch-serverless-openapi.json | 2 +- output/schema/schema-serverless.json | 12 ++++++------ output/schema/schema.json | 18 +++++++++--------- output/typescript/types.ts | 14 +++++++------- .../_global/msearch/MultiSearchRequest.ts | 7 +++---- specification/_global/search/SearchRequest.ts | 2 +- .../submit/AsyncSearchSubmitRequest.ts | 2 +- .../fleet/msearch/MultiSearchRequest.ts | 6 +++--- specification/fleet/search/SearchRequest.ts | 2 +- 10 files changed, 33 insertions(+), 34 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 62a6ae1e27..a639761555 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -111303,7 +111303,7 @@ "msearch#max_concurrent_searches": { "in": "query", "name": "max_concurrent_searches", - "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", + "description": "Maximum number of concurrent searches the multi search API can execute.", "deprecated": false, "schema": { "type": "number" diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 3915e8d730..999629b78d 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -66191,7 +66191,7 @@ "msearch#max_concurrent_searches": { "in": "query", "name": "max_concurrent_searches", - "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", + "description": "Maximum number of concurrent searches the multi search API can execute.", "deprecated": false, "schema": { "type": "number" diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index fc6c0e2273..143fc79c65 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -12474,7 +12474,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } @@ -39300,13 +39300,13 @@ } }, { - "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", + "description": "Maximum number of concurrent searches the multi search API can execute.", "name": "max_concurrent_searches", "required": false, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } @@ -39319,7 +39319,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } @@ -39386,7 +39386,7 @@ } } ], - "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L136" + "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L135" }, { "body": { @@ -42749,7 +42749,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } diff --git a/output/schema/schema.json b/output/schema/schema.json index 468c9b7f1a..657a1e0251 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -31949,13 +31949,13 @@ } }, { - "description": "Maximum number of concurrent searches the multi search API can execute.\nDefaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.", + "description": "Maximum number of concurrent searches the multi search API can execute.", "name": "max_concurrent_searches", "required": false, "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } @@ -31968,7 +31968,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } @@ -32035,7 +32035,7 @@ } } ], - "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L136" + "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L135" }, { "kind": "type_alias", @@ -36605,7 +36605,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } @@ -92809,7 +92809,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } @@ -126215,7 +126215,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } @@ -126228,7 +126228,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } @@ -126992,7 +126992,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "long", "namespace": "_types" } } diff --git a/output/typescript/types.ts b/output/typescript/types.ts index fd274ba3e5..bd6d7b94f5 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -823,8 +823,8 @@ export interface MsearchRequest extends RequestBase { ignore_throttled?: boolean ignore_unavailable?: boolean include_named_queries_score?: boolean - max_concurrent_searches?: integer - max_concurrent_shard_requests?: integer + max_concurrent_searches?: long + max_concurrent_shard_requests?: long pre_filter_shard_size?: long rest_total_hits_as_int?: boolean routing?: Routing @@ -1212,7 +1212,7 @@ export interface SearchRequest extends RequestBase { ignore_unavailable?: boolean include_named_queries_score?: boolean lenient?: boolean - max_concurrent_shard_requests?: integer + max_concurrent_shard_requests?: long preference?: string pre_filter_shard_size?: long request_cache?: boolean @@ -6834,7 +6834,7 @@ export interface AsyncSearchSubmitRequest extends RequestBase { ignore_throttled?: boolean ignore_unavailable?: boolean lenient?: boolean - max_concurrent_shard_requests?: integer + max_concurrent_shard_requests?: long preference?: string request_cache?: boolean routing?: Routing @@ -10707,8 +10707,8 @@ export interface FleetMsearchRequest extends RequestBase { expand_wildcards?: ExpandWildcards ignore_throttled?: boolean ignore_unavailable?: boolean - max_concurrent_searches?: integer - max_concurrent_shard_requests?: integer + max_concurrent_searches?: long + max_concurrent_shard_requests?: long pre_filter_shard_size?: long search_type?: SearchType rest_total_hits_as_int?: boolean @@ -10737,7 +10737,7 @@ export interface FleetSearchRequest extends RequestBase { ignore_throttled?: boolean ignore_unavailable?: boolean lenient?: boolean - max_concurrent_shard_requests?: integer + max_concurrent_shard_requests?: long preference?: string pre_filter_shard_size?: long request_cache?: boolean diff --git a/specification/_global/msearch/MultiSearchRequest.ts b/specification/_global/msearch/MultiSearchRequest.ts index c448fb7181..96081977dd 100644 --- a/specification/_global/msearch/MultiSearchRequest.ts +++ b/specification/_global/msearch/MultiSearchRequest.ts @@ -19,7 +19,7 @@ import { RequestBase } from '@_types/Base' import { ExpandWildcards, Indices, Routing, SearchType } from '@_types/common' -import { integer, long } from '@_types/Numeric' +import { long } from '@_types/Numeric' import { RequestItem } from './types' /** @@ -101,14 +101,13 @@ export interface Request extends RequestBase { include_named_queries_score?: boolean /** * Maximum number of concurrent searches the multi search API can execute. - * Defaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`. */ - max_concurrent_searches?: integer + max_concurrent_searches?: long /** * Maximum number of concurrent shard requests that each sub-search request executes per node. * @server_default 5 */ - max_concurrent_shard_requests?: integer + max_concurrent_shard_requests?: long /** * Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. */ diff --git a/specification/_global/search/SearchRequest.ts b/specification/_global/search/SearchRequest.ts index bd277f77cc..895e970d02 100644 --- a/specification/_global/search/SearchRequest.ts +++ b/specification/_global/search/SearchRequest.ts @@ -195,7 +195,7 @@ export interface Request extends RequestBase { * This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. * @server_default 5 */ - max_concurrent_shard_requests?: integer + max_concurrent_shard_requests?: long /** * The nodes and shards used for the search. * By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. diff --git a/specification/async_search/submit/AsyncSearchSubmitRequest.ts b/specification/async_search/submit/AsyncSearchSubmitRequest.ts index 62b1d3ecca..86e60bc5fd 100644 --- a/specification/async_search/submit/AsyncSearchSubmitRequest.ts +++ b/specification/async_search/submit/AsyncSearchSubmitRequest.ts @@ -124,7 +124,7 @@ export interface Request extends RequestBase { ignore_throttled?: boolean ignore_unavailable?: boolean lenient?: boolean - max_concurrent_shard_requests?: integer + max_concurrent_shard_requests?: long preference?: string /** @server_default true */ request_cache?: boolean diff --git a/specification/fleet/msearch/MultiSearchRequest.ts b/specification/fleet/msearch/MultiSearchRequest.ts index 931572dada..4ba51f62af 100644 --- a/specification/fleet/msearch/MultiSearchRequest.ts +++ b/specification/fleet/msearch/MultiSearchRequest.ts @@ -25,7 +25,7 @@ import { IndexName, SearchType } from '@_types/common' -import { integer, long } from '@_types/Numeric' +import { long } from '@_types/Numeric' import { Checkpoint } from '../_types/Checkpoints' /** @@ -84,12 +84,12 @@ export interface Request extends RequestBase { /** * Maximum number of concurrent searches the multi search API can execute. */ - max_concurrent_searches?: integer + max_concurrent_searches?: long /** * Maximum number of concurrent shard requests that each sub-search request executes per node. * @server_default 5 */ - max_concurrent_shard_requests?: integer + max_concurrent_shard_requests?: long /** * Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. */ diff --git a/specification/fleet/search/SearchRequest.ts b/specification/fleet/search/SearchRequest.ts index 5883cf8a7d..ce816fa7f1 100644 --- a/specification/fleet/search/SearchRequest.ts +++ b/specification/fleet/search/SearchRequest.ts @@ -88,7 +88,7 @@ export interface Request extends RequestBase { ignore_throttled?: boolean ignore_unavailable?: boolean lenient?: boolean - max_concurrent_shard_requests?: integer + max_concurrent_shard_requests?: long preference?: string pre_filter_shard_size?: long request_cache?: boolean