Document DB - ST_DISTANCE
问题 Would a query like SELECT TOP 1 * ST_DISTANCE etc or more specifically SELECT TOP 1 * FROM c WHERE ST_DISTANCE(c.AssetLocation, { 'type': 'Point', 'coordinates': [115.58, 21.84] }) < 49999 return the closest object, and if not, how could I order by distance? Thanks, Ian 回答1: DocumentDB does not natively support nearest or ORDER BY using Geo-Spatial index yet. The best approach for ORDER BY is to project ( SELECT ) the distance in the query and sort it either client-side or via a stored