Skip to content

[Backport 9.0] Fix type of max_concurrent_searches and max_concurrent_shard_requests #4175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion output/openapi/elasticsearch-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion output/openapi/elasticsearch-serverless-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions output/schema/schema-serverless.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions specification/_global/msearch/MultiSearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

/**
Expand Down Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion specification/_global/search/SearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions specification/fleet/msearch/MultiSearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

/**
Expand Down Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion specification/fleet/search/SearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down