简体   繁体   English

扫描并滚动弹簧数据elasticsearch 3

[英]scan and scroll in spring data elasticsearch 3

I am trying to migrate my es 2.2.1 with spring data elastic 2 to ES 5.6.1 with spring Data elastic 3 but when i am trying to use scan scroll method for large dataaset i am not able to access them, its look like ElasticsearchTemaplate class do not have these function any more in the newer version Can you please let me know what is the substitute of scan and scroll in SDA 3.x:- 我正在尝试将带有弹簧数据弹性2的es 2.2.1迁移到带有弹簧数据弹性3的ES 5.6.1,但是当我尝试对大型数据集使用扫描滚动方法时,我无法访问它们,它看起来像ElasticsearchTemaplate类在新版本中不再具有这些功能。能否让我知道SDA 3.x中扫描和滚动的替代方法是什么:-

ElasticsearchTemplate rep=null;

 String scrollId = rep.scan(searchQuery, (long)25000, false);
        //List<SampleEntity> sampleEntities = new ArrayList<SampleEntity>();
        boolean hasRecords = true;

You now can use startScroll method instead of scan() and scroll(). 现在,您可以使用startScroll方法而不是scan()和scroll()。 It's not presented in current docs. 当前文档中未提供。

Here are example ElasticsearchTemplate retrieve big data sets 这是示例ElasticsearchTemplate检索大数据集

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM