Take the 2-minute tour ×  This is my mongoose schema -  var
userDestinationSchema = mongoose.Schema({      uid: String,
update_time: Date,                location:{
//<INDEXED as 2d>         lon: Number,         lat: Number  var
userDestinationModel = mongoose.model('userDestinationModel',
userDestinationSchema);  How do I query the model for geoNear?
I tried doing this and it ain't working.                {
maxDistance : 50, spherical : true },
function(err, results, stats) {  maxDistance : 50  What is the
unit? Km?  share|improve this question add comment  1 Answer  I
can answer the distance part, but I've never used geoNear with
Mongoose I'm afraid - a good way to tell if the issue lies in
how you are calling things in Mongoose versus the query itself
would be to try it on the mongo shell first to verify that it is
returning the results you expect there.  In terms of the
distance, for legacy 2d points (which you appear to be using),
the $maxdistance is s