Skip to content

Instantly share code, notes, and snippets.

@wbsimms
Last active October 2, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wbsimms/0657c47390a56b3cc5f6 to your computer and use it in GitHub Desktop.
Save wbsimms/0657c47390a56b3cc5f6 to your computer and use it in GitHub Desktop.
ElasticClient client = new ElasticClient(new ConnectionSettings(new Uri("http://localhost:9200"),"index"));
var result = client.Search<IndexType>(x => x.SearchType(SearchType.Scan)
.Size(1)
.Scroll("12s"));
Assert.IsNotNull(result);
var docCount = result.Documents.Count();
Console.WriteLine("count :"+docCount);
var results2 = client.Scroll<IndexType>(x => x.Scroll("12s").ScrollId(result.ScrollId));
var docCount2 = results2.Documents.Count();
Console.WriteLine("count2 :" + docCount2);
@wbsimms
Copy link
Author

wbsimms commented Sep 23, 2015

NEST Scan and scroll example.

@wbsimms
Copy link
Author

wbsimms commented Oct 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment