简体   繁体   中英

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:-

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(). It's not presented in current docs.

Here are example ElasticsearchTemplate retrieve big data sets

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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