From ff7ff76a1d0ddd4c13f63a5f2eae738ba7f38266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Mon, 3 Sep 2018 15:51:13 +0200 Subject: [PATCH 1/2] [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 #31263 --- docs/reference/search.asciidoc | 12 ++++++++---- docs/reference/search/request-body.asciidoc | 4 +++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/reference/search.asciidoc b/docs/reference/search.asciidoc index f08a10aeb646b..a59522fe33de7 100644 --- a/docs/reference/search.asciidoc +++ b/docs/reference/search.asciidoc @@ -119,10 +119,14 @@ Individual searches can have a timeout as part of the <>. Since search requests can originate from many sources, Elasticsearch has a dynamic cluster-level setting for a global search timeout that applies to all search requests that do not set a -timeout in the <>. The default value is no global -timeout. The setting key is `search.default_search_timeout` and can be -set using the <> endpoints. Setting this value -to `-1` resets the global search timeout to no timeout. +timeout in the request body. These requests will be canceled after +the specified time using the mechanism described in the following section on +<>. Therefore the same caveats about timeout +responsiveness apply. + +The setting key is `search.default_search_timeout` and can be set using the +<> endpoints. The default value is no global timeout. +Setting this value to `-1` resets the global search timeout to no timeout. [float] [[global-search-cancellation]] diff --git a/docs/reference/search/request-body.asciidoc b/docs/reference/search/request-body.asciidoc index ad24d9c93c6b6..5be54662d012c 100644 --- a/docs/reference/search/request-body.asciidoc +++ b/docs/reference/search/request-body.asciidoc @@ -60,7 +60,9 @@ And here is a sample response: A search timeout, bounding the search request to be executed within the specified time value and bail with the hits accumulated up to that point - when expired. Defaults to no timeout. See <>. + when expired. Search requests are canceled after the timeout is reached using + the <> mechanism. + Defaults to no timeout. See <>. `from`:: From 0023ed747d4884e5ba69fab45841b0d3b2353348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Mon, 3 Sep 2018 16:59:16 +0200 Subject: [PATCH 2/2] fix typo --- docs/reference/search.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/search.asciidoc b/docs/reference/search.asciidoc index a59522fe33de7..c73642c67131a 100644 --- a/docs/reference/search.asciidoc +++ b/docs/reference/search.asciidoc @@ -119,7 +119,7 @@ Individual searches can have a timeout as part of the <>. Since search requests can originate from many sources, Elasticsearch has a dynamic cluster-level setting for a global search timeout that applies to all search requests that do not set a -timeout in the request body. These requests will be canceled after +timeout in the request body. These requests will be cancelled after the specified time using the mechanism described in the following section on <>. Therefore the same caveats about timeout responsiveness apply.