I have large datasets, for which I am trying to perform the pagination, while reading the documentation I came across the PIT(Point-In-Time) concepts, which will help to get the consistent results.
I am using below API to open PIT, after 1m, it will be closed.
POST /order/_pit?keep_alive=1m
Questions is: How to come up with the best PIT time(ex:1m,5m), so that my search request will be more performant?
From the 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.