Max_result_window

I have a problem where in some rare cases I am asked to bring results with parameters
"from":"10000", "size":"1000".
Of course, it fails on max_result_window.
Unfortunately, the "from" also could be much bigger...
Should I run a while loop in the server with scroll? any other way?
The sorting is also different between different requests so search after is not an option.

You can change index.max_result_window index setting as well.

See https://www.elastic.co/guide/en/elasticsearch/reference/5.4/index-modules.html#dynamic-index-settings

Thanks, I was aware of that.
Though it could be dangerous, am I wrong?

Though it could be dangerous, am I wrong?

Well. If you increase to 10001, not really.
If you increase to 10000000, probably. In term of memory...

I have only 1 shard and 2 replicas. This should make ES life easier while deep paging, right?

Probably less things to keep in memory because you have only one shard.

Try with many users, and monitor your HEAP usage.

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