Skip to content

Instantly share code, notes, and snippets.

@Cicciokr
Cicciokr / nestscroll.cs
Created October 31, 2017 13:12
Nest Elastic 5 Scan - Scroll example
var n = 100;
ElasticClient client = new ElasticClient(new Uri("http://localhost:9200"));
var result = client.Search<IndexType>(x =>
.Index("index")
.Type("type")
.From(0)
.Size(n)
.Scroll("12s"));
if (!response1.IsValid || string.IsNullOrEmpty(response1.ScrollId))