The geoDistance-function enables you to order the results according to distance to a given geo-point.
Documents with no geo-point property with the given path will be ordered last if matching the query.
- Field-argument accepts a path to a property containing geoPoint data.
- The location is a geoPoint from which the distance factor should be calculated, formatted as “latitude,longitude”.
Order by distance from “shopLocation” to the fixed location.
ORDER BY geoDistance("shopLocation", "59.9127300,10.7460900")