var client = new ElasticClient();
// use your document type instead of object
var searchResponse = client.Search<object>(s => s
.Aggregations(a => a
.Filter("positive_lat", f => f
.Filter(q => q
.Bool(b => b
.MustNot(mn => mn
.Term("latitude", 0)
)
)
)
.Aggregations(aa => aa
.Min("min_lat", m => m
.Field("latitude")
)
)
)
)
);
// do something with min latitude
var minLatitude = searchResponse.Aggregations.Filter("positive_lat").Min("min_lat").Value;
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.