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.

183c32d4c3/server/src/main/java/org/elasticsearch/search/SearchService.java (L491)
This commit is contained in:
Stéphane Campinas 2018-10-25 22:48:06 +02:00 committed by Nik Everett
parent 59df6e8689
commit 27c4d63340
1 changed files with 3 additions and 1 deletions

View File

@ -109,7 +109,9 @@ request) tells Elasticsearch how long it should keep the search context alive.
Its value (e.g. `1m`, see <<time-units>>) does not need to be long enough to Its value (e.g. `1m`, see <<time-units>>) does not need to be long enough to
process all data -- it just needs to be long enough to process the previous process all data -- it just needs to be long enough to process the previous
batch of results. Each `scroll` request (with the `scroll` parameter) sets a batch of results. Each `scroll` request (with the `scroll` parameter) sets a
new expiry time. new expiry time. If a `scroll` request doesn't pass in the `scroll`
parameter, then the search context will be freed as part of _that_ `scroll`
request.
Normally, the background merge process optimizes the Normally, the background merge process optimizes the
index by merging together smaller segments to create new bigger segments, at index by merging together smaller segments to create new bigger segments, at