统计定点范围内的对象数量报错(geonear count)

发布于 7 年前作者 suyang1073 次浏览最后编辑 7 年前来自 ask

统计定点范围内的对象数量报错

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; 

现象和这个问题一样

0 回复
暂无回复