mongo 附近的点按指定字段排序

mac2022-06-30  69

db.collection.aggregate([{$geoNear:{ "near":[ 118.116677, 24.463955], "spherical":true, "distanceField":"distance", "limit":5}}, {$sort:{"id":1}}])

转载于:https://www.cnblogs.com/chimmu/p/6212324.html

最新回复(0)