elastic icon indicating copy to clipboard operation
elastic copied to clipboard

Iterator to replace/unify scroll/scan

Open olivere opened this issue 10 years ago • 3 comments

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 avatar Apr 14 '16 07:04 olivere

@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?

vsiv avatar May 23 '16 02:05 vsiv

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.

olivere avatar May 23 '16 06:05 olivere

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.

olivere avatar Sep 22 '16 14:09 olivere