I am using .From() and .Size() methods to retrieve all documents from Elastic Search results.
Below is sample example –
ISearchResponse<dynamic> bResponse = ObjElasticClient.Search<dynamic>(s => s.From(0).Size(25000).Index("accounts").AllTypes().Query(Query));
Recently i came across scroll feature of Elastic Search. This looks better approach than From() and Size() methods specifically to fetch large data.
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html
I looking for example on Scroll feature in NEST API.
Can someone please provide NEST example?
Thanks,
Sameer
Best Answer
Here's an example of using scroll with NEST and C#. Works with 5.x and 6.x
It's from: http://telegraphrepaircompany.com/elasticsearch-nest-scroll-api-c/