Maximums for searchAfter (and scroll) size parameter?

Hi, I'm curious about ES 7.12 searchAfter and scroll. Both of these have a size parameter. What's the recommended limit to this parameter? I see none given, so I take it's a function of memory and cluster capacity somehow? Both searchAfter and scroll are also not affected by the index.max_result_window in any way, correct? Thank you.

I believe that the limit is the same, 100000 by default.

@dadoonet Thanks. So 10k. Wish this was stated in the documentation.

I'm curious if it's the same because scroll and searchAfter basically chunk a much larger request into multiple requests in a way (e.g. pointers) that use less heap memory than from + size? That's my interpretation of the documentation below:

index.max_result_window:

The maximum value of from + size for searches to this index. Defaults to 10000 . Search requests take heap memory and time proportional to from + size and this limits that memory. See Scroll or Search After for a more efficient alternative to raising this.

That will produce the same. You can't more than 10000 hits at once whatever the API.

Scroll helps to get the next 10000 hits while being consistent.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.