geoNear无法使用count()
-
当前 Bug 的表现(可附上截图)
-
预期表现
-
复现路径
-
提供一个最简复现 Demo
db.collection('user_address').where({location: _.geoNear({geometry: user_location[0].location,minDistance: 0,maxDistance: 5000})}).count({success: function (res) {console.debug("db.collection('user_address')", res)},fail:err=>{console.debug("db.collection('user_address')", err)}}) |
如上代码,运行后返回错误:
db.collection(‘user_address’) Error: errCode: -502001 database request fail | errMsg: [FailedOperation.Query] (BadValue) $geoNear, $near, and $nearSphere are not allowed in this context
求解使用geoNear查询附近的点如何过去查询结果的总条数,如果不支持count,应该如何获得总的记录条数?
