priyanshu goyal
priyanshu goyal

Reputation: 21

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;

Upvotes: 2

Views: 1515

Answers (1)

Ivan Bolshakov
Ivan Bolshakov

Reputation: 11

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

Upvotes: 1

Related Questions