From 378bb8643611447c79fcff894dd8ed081fa96728 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 28 Mar 2025 16:18:18 +0400 Subject: [PATCH] Fix type of max_concurrent_searches and max_concurrent_shard_requests --- 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, 34 insertions(+), 33 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 4325072d33..64ab010ec7 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -111293,7 +111293,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..a4b22bcf72 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -66181,7 +66181,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..ca6690413a 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": { @@ -42736,7 +42736,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..bc0f3c05f0 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", @@ -36592,7 +36592,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -92796,7 +92796,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -126202,7 +126202,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -126215,7 +126215,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } @@ -126979,7 +126979,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "integer", "namespace": "_types" } } diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 51f16d16c4..2d223dcba0 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 @@ -1211,7 +1211,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 +6833,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 +10706,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 +10736,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/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