I want to use elastic geodistance query in my C# application. I have referred the example on Elastic NEST API documentation which didn't work for me.
Below is my code. kindly share with me an example I'm using elasticsearch version 6+
var geoResult = client.Search<Myclass>(s => s .Take(100) .Query(q => q .GeoDistance(g => g .Boost(1.1) .Name("named_query") .Field(p => p.geometry) .DistanceType(GeoDistanceType.Arc) .Location( 39.589114,24.481397) .Distance("200.0m") .ValidationMethod(GeoValidationMethod.IgnoreMalformed) )));
I want to calculate the distance from the provided lat long but the query returns no results.