mongodb sort 支持表达式排序吗?例如按照经纬度两列计算距离的值后,进行排序。
回复 (4)
I
经纬度有单独的api啊 geohash
L
引用 i5ting经纬度有单独的api啊 geohash
@i5ting geohash 支持排序?
我是把长方形内的点拿到,再算距离。
L
邻近查询使用 $near 操作符 geoNear always returns the documents sorted by distance.
参与回复
登录后即可参与回复。登录
mongodb sort 支持表达式排序吗?例如按照经纬度两列计算距离的值后,进行排序。
经纬度有单独的api啊 geohash
@i5ting geohash 支持排序?
我是把长方形内的点拿到,再算距离。
邻近查询使用 $near 操作符 geoNear always returns the documents sorted by distance.