0
下面是我正在使用的Mongo查詢,但即使將maxDistance增加到最大可能值,這也會返回100作爲最大記錄。我知道有很多記錄mongo沒有返回,值超過15英里作爲maxDistance它總是返回100個文件,請幫助。Mongodb沒有返回超過100條記錄
db.business.aggregate([
{ "$geoNear" : {
"maxDistance" : 0.005046438589510322, --this is 15 miles
"distanceMultiplier" : 3963.191 ,
"near" : [ -84.464374 , 33.864826] ,
"spherical" : true ,
"distanceField" : "distance",
query: {
"category": { "$eq": "restaurant" }
}
}
} ,
{ "$match" : { "status" : { "$in" : [ "active"]}}}, {
$group: {
_id : null,
count : {$sum : 1}
}
}
])
真棒,你救了我的一天, 謝謝 – Sam