我很困惑为什么在我的猫鼬模型上找不到geoNear:
var location = { type : 'Point', coordinates : coordinates };
Shift.geoNear(location, { maxDistance : 5, spherical : true }, function(err, results, stats) {
response.json(results);
console.log(stats);
});
TypeError: Object function model(doc, fields, skipId) {
if (!(this instanceof model))
return new model(doc, fields, skipId);
Model.call(this, doc, fields, skipId);
} has no method 'geoNear'