ElasticSearch: search_after with refresh

Hello,

I have searched for quite some time but did not find an answer yet. I'm currently looking into doing some pagination over my data. I have stumbled across the search_after functionality. The queries work quite nice but I'm a bit worried about the following sentences from the documentation:

Using search_after requires multiple search requests with the same query and sort values. If a refresh occurs between these requests, the order of your results may change, causing inconsistent results across pages. To prevent this, you can create a point in time (PIT) to preserve the current index state over your searches.

The documentation is saying that there may be inconsistent results if there is a refresh in between the requests. However, is this also true even if no document matching my previous query is added / changed / deleted? or is search_after safe to use in this case?

I'm actually asking because as far as I know PITs are currently not supported in the high level rest client and I would be happy not needing to use the low level client.

Kind regards,
Tobias

Technically yes, because that change would cause a refresh to happen.

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