Skip to content

Commit b69e829

Browse files
scampinik9000
authored andcommitted
document the search context is freed if the scroll is not extended (#34739)
The `fetchPhaseShouldFreeContext` returns true when there is a scroll context but the scroll parameter is null, thus freeing the search context. https://github.com/elastic/elasticsearch/blob/183c32d4c39948e037a7fb44dccf31ab0d60d3c3/server/src/main/java/org/elasticsearch/search/SearchService.java#L491
1 parent 11104a5 commit b69e829

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/reference/search/request/scroll.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ request) tells Elasticsearch how long it should keep the search context alive.
109109
Its value (e.g. `1m`, see <<time-units>>) does not need to be long enough to
110110
process all data -- it just needs to be long enough to process the previous
111111
batch of results. Each `scroll` request (with the `scroll` parameter) sets a
112-
new expiry time.
112+
new expiry time. If a `scroll` request doesn't pass in the `scroll`
113+
parameter, then the search context will be freed as part of _that_ `scroll`
114+
request.
113115

114116
Normally, the background merge process optimizes the
115117
index by merging together smaller segments to create new bigger segments, at

0 commit comments

Comments
 (0)