Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2919

$near example show $maxDistance in the wrong sub-document.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • v1.3.2
    • None
    • manual
    • None

    Description

      http://docs.mongodb.org/manual/reference/operator/query/near/#op._S_near

      Looks like our docs show maxDistance in the wrong spot.

      The maxDistance should be in $geometry:
      http://docs.mongodb.org/master/release-notes/2.6-compatibility/#maxdistance-changes

      Here's an example from our page with the maxDistance in the $near doc:

      db.places.find( { loc : { $near :
                                 { $geometry :
                                     { type : "Point" ,
                                       coordinates: [ 40 , 5 ] } },
                                   $maxDistance : 500
                      } } )

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 48 weeks, 2 days ago