统计定点范围内的对象数量报错(geonear count)
统计定点范围内的对象数量报错
db.collection( 'house' ).where({ location: _.geoNear({ geometry: db.Geo.Point(event.location.longitude, event.location.latitude), minDistance: event.minDis, maxDistance: event.maxDis }) }).count() |
返回
Error: errCode: -502001 database request fail | errMsg: [FailedOperation.Query] (BadValue) $geoNear, $near, and $nearSphere are not allowed in this context;
现象和这个问题一样