Skip to content

Commit ff7ff76

Browse files
author
Christoph Büscher
committed
[Docs] Add search timeout caveats
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 elastic#31263
1 parent 2fa75b4 commit ff7ff76

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

docs/reference/search.asciidoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,14 @@ Individual searches can have a timeout as part of the
119119
<<search-request-body>>. Since search requests can originate from many
120120
sources, Elasticsearch has a dynamic cluster-level setting for a global
121121
search timeout that applies to all search requests that do not set a
122-
timeout in the <<search-request-body>>. The default value is no global
123-
timeout. The setting key is `search.default_search_timeout` and can be
124-
set using the <<cluster-update-settings>> endpoints. Setting this value
125-
to `-1` resets the global search timeout to no timeout.
122+
timeout in the request body. These requests will be canceled after
123+
the specified time using the mechanism described in the following section on
124+
<<global-search-cancellation>>. Therefore the same caveats about timeout
125+
responsiveness apply.
126+
127+
The setting key is `search.default_search_timeout` and can be set using the
128+
<<cluster-update-settings>> endpoints. The default value is no global timeout.
129+
Setting this value to `-1` resets the global search timeout to no timeout.
126130

127131
[float]
128132
[[global-search-cancellation]]

docs/reference/search/request-body.asciidoc

Lines changed: 3 additions & 1 deletion
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)