Skip to content

Commit e538592

Browse files
committed
Update max_concurrent_shard_request parameter docs (#42227)
Some of the docs were outdated as they did not mention that the limit is not per node. Also, The default value changed. Relates to #31206
1 parent 31e8bff commit e538592

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

docs/reference/search.asciidoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,11 @@ configure a soft limit, you can update the `action.search.shard_count.limit`
154154
cluster setting in order to reject search requests that hit too many shards.
155155

156156
The request parameter `max_concurrent_shard_requests` can be used to control the
157-
maximum number of concurrent shard requests the search API will execute for the
158-
request. This parameter should be used to protect a single request from
157+
maximum number of concurrent shard requests the search API will execute per node
158+
for the request. This parameter should be used to protect a single request from
159159
overloading a cluster (e.g., a default request will hit all indices in a cluster
160160
which could cause shard request rejections if the number of shards per node is
161-
high). This default is based on the number of data nodes in the cluster but at
162-
most `256`.
161+
high). This default value is `5`.
163162

164163
--
165164

docs/reference/search/multi-search.asciidoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,16 @@ The msearch's `max_concurrent_searches` request parameter can be used to control
8585
the maximum number of concurrent searches the multi search api will execute.
8686
This default is based on the number of data nodes and the default search thread pool size.
8787

88-
The request parameter `max_concurrent_shard_requests` can be used to control the
89-
maximum number of concurrent shard requests the each sub search request will execute.
90-
This parameter should be used to protect a single request from overloading a cluster
91-
(e.g., a default request will hit all indices in a cluster which could cause shard request rejections
92-
if the number of shards per node is high). This default is based on the number of
93-
data nodes in the cluster but at most `256`.In certain scenarios parallelism isn't achieved through
94-
concurrent request such that this protection will result in poor performance. For
95-
instance in an environment where only a very low number of concurrent search requests are expected
96-
it might help to increase this value to a higher number.
88+
The request parameter `max_concurrent_shard_requests` can be used to control
89+
the maximum number of concurrent shard requests that each sub search request
90+
will execute per node. This parameter should be used to protect a single
91+
request from overloading a cluster (e.g., a default request will hit all
92+
indices in a cluster which could cause shard request rejections if the number
93+
of shards per node is high). This default value is `5`.In certain scenarios
94+
parallelism isn't achieved through concurrent request such that this protection
95+
will result in poor performance. For instance in an environment where only a
96+
very low number of concurrent search requests are expected it might help to
97+
increase this value to a higher number.
9798

9899
[float]
99100
[[msearch-security]]

rest-api-spec/src/main/resources/rest-api-spec/api/msearch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
},
4343
"max_concurrent_shard_requests" : {
4444
"type" : "number",
45-
"description" : "The number of concurrent shard requests each sub search executes concurrently. 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",
46-
"default" : "The default grows with the number of nodes in the cluster but is at most 256."
45+
"description" : "The number of concurrent shard requests each sub search executes concurrently per node. 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",
46+
"default" : 5
4747
},
4848
"rest_total_hits_as_int" : {
4949
"type" : "boolean",

rest-api-spec/src/main/resources/rest-api-spec/api/search.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
"max_concurrent_shard_requests" : {
192192
"type" : "number",
193193
"description" : "The number of concurrent shard requests per node this search executes concurrently. 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",
194-
"default" : "The default is 5."
194+
"default" : 5
195195
},
196196
"pre_filter_shard_size" : {
197197
"type" : "number",

0 commit comments

Comments
 (0)