Skip to content

Commit 8f814c5

Browse files
author
Christoph Büscher
committed
[Docs] Add search timeout caveats (#33354)
Global search timeouts and timeouts specified in the search request body use the same internal mechanism as search cancellation. Therefore the same caveats apply, mostly around the responsiveness of the timeout which gets only checked by a running search on segment boundaries by default. Closes #31263
1 parent bc37003 commit 8f814c5

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

docs/reference/search.asciidoc

+8-4
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,14 @@ Individual searches can have a timeout as part of the
115115
<<search-request-body>>. Since search requests can originate from many
116116
sources, Elasticsearch has a dynamic cluster-level setting for a global
117117
search timeout that applies to all search requests that do not set a
118-
timeout in the <<search-request-body>>. The default value is no global
119-
timeout. The setting key is `search.default_search_timeout` and can be
120-
set using the <<cluster-update-settings>> endpoints. Setting this value
121-
to `-1` resets the global search timeout to no timeout.
118+
timeout in the request body. These requests will be cancelled after
119+
the specified time using the mechanism described in the following section on
120+
<<global-search-cancellation>>. Therefore the same caveats about timeout
121+
responsiveness apply.
122+
123+
The setting key is `search.default_search_timeout` and can be set using the
124+
<<cluster-update-settings>> endpoints. The default value is no global timeout.
125+
Setting this value to `-1` resets the global search timeout to no timeout.
122126

123127
[float]
124128
[[global-search-cancellation]]

docs/reference/search/request-body.asciidoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ And here is a sample response:
6060

6161
A search timeout, bounding the search request to be executed within the
6262
specified time value and bail with the hits accumulated up to that point
63-
when expired. Defaults to no timeout. See <<time-units>>.
63+
when expired. Search requests are canceled after the timeout is reached using
64+
the <<global-search-cancellation>> mechanism.
65+
Defaults to no timeout. See <<time-units>>.
6466

6567
`from`::
6668

0 commit comments

Comments
 (0)