Iterator to replace/unify scroll/scan
Elastic currently has two very similar solutions for iterating through the results of a query/index. Both have their pros/cons. Let's unify them with a focus on usability and performance.
@olivere scan is deprecated in 2.1.0 - https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-request-search-type.html
so this might not be necessary?
Yes. I suppose I'm going to implement that in the 5.0 beta cycle and backport it to (at least) Elastic 3.x (ES 2.x).
I didn't have the time to test against the 5.0 alpha's yet. But I'm pretty sure 90% of the 3.x branch still works fine.
BTW: I removed the search_type=scan in a recent commit.
I recently updated the Scroll service. It works fine with and allows to scroll in parallel. So I don't think we need a new cursor-like mechanism.
5.0 will come with scroll partitioning, and we'll implement that eventually. In ES 5.0 I will remove Scan service. That will remove one of the most confusing facts of Elastic today: The existence of two scroll mechanisms. With 5.0, there will be only Scroll service.