elasticsearch-py icon indicating copy to clipboard operation
elasticsearch-py copied to clipboard

Replacement for scan helper function that uses search_after

Open banjocustard opened this issue 3 years ago • 2 comments

I would like a helper function to replace scan, one that uses the search_after parameter with a point in time (PIT) instead of the scroll API.

I use scan frequently, but I would like to switch to using search_after instead of the scroll API, given that is now what is recommended. I appreciate that it is possible to do this using Elasticsearch.open_point_in_time etc., but it would be really useful if the library came with a ready-made helper function given that paging through more than 10,000 hits is presumably quite a common requirement, especially so as there is an existing helper function for the no-longer-recommended scroll API.

banjocustard avatar Sep 25 '22 07:09 banjocustard

Agree that this would be nice to have! I'll raise this as a feature request that all clients can implement for their scan helpers.

sethmlarson avatar Sep 30 '22 15:09 sethmlarson

Hello! Are there any work in progress on this issue?

I found a ready-made implementation, it may be useful to you - link

bralbral avatar Apr 05 '23 20:04 bralbral