Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
Description
The $maxDistance operator is misplaced in the documentation for the $near operator. The syntax and GeoJSON example puts the $maxDistance operator inside of the $near document instead of within the $geometry document as it should be. Either placement works fine for MongoDB 2.4.x, but the syntax is more strict for >= 2.5. I believe the example should be:
db.places.find( { loc : { $near :
|
{ $geometry :
|
{ type : "Point" ,
|
coordinates: [ 40 , 5 ] }
|
$maxDistance : 500
|
},
|
}
|
} )
|