[DOCS-2353] Misplaced $maxDistance inside of $near Created: 06/Dec/13  Updated: 02/Feb/15  Resolved: 20/Feb/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.1

Type: Bug Priority: Major - P3
Reporter: Luke Lovett Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: 26qa, nqf, sprint-slipstream
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 9 years, 51 weeks, 6 days ago

 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
                          },
                        }
                } )



 Comments   
Comment by Githook User [ 20/Feb/14 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-2353 maxDistance in the near doc and non-negative value
Branch: master
https://github.com/mongodb/docs/commit/d5acd9aef07cb942928de8b7bb63b02d7517f686

Generated at Thu Feb 08 07:43:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.