How do I query MongoDB for nearby geographic points using the C# driver and the GeoNear method?
The following returns points with an incorrect Distance value:
var results = myCollection.GeoNear(
Query.GT("ExpiresOn", now), // only recent values
latitude,
longitude,
20
);
I suspect I should be telling Mongo to query on the double[] Location field, but I don’t know the query syntax.
Found the answer via this and this: