search_after如何为Elasticsearch分页选择最佳时间点?

How to choose optimal Point in Time for Elasticsearch Pagination with search_after?

我有大型数据集,我正在尝试为其执行分页, 在阅读文档时,我遇到了 PIT(时间点) 概念,这将有助于获得一致的结果。

我在下面用API开PIT,1m后会关闭

POST /order/_pit?keep_alive=1m

问题是:如何想出最好的 PIT 时间(例如:1 米,5 米),以便我的搜索请求更高效?

来自official documentation

The keep_alive parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time. The 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 for the next request.