Last active
October 2, 2015 14:13
-
-
Save wbsimms/0657c47390a56b3cc5f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NEST Scan and scroll example.