Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-950

Misplaced $maxDistance inside of $near

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 1.9.1
    • Affects Version/s: 1.9
    • Component/s: API
    • Labels:
      None
    • Environment:
      windows 8, windows 2008, mongodb 2.6.0

      Misplaced $maxDistance inside of $near

      see: http://docs.mongodb.org/master/release-notes/2.6-compatibility/#maxdistance-changes

      In previous version, $maxDistance could be either inside or outside the $near document.
      You must update any existing $near queries on GeoJSON data that currently have the $maxDistance outside the $near document

      Example:

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

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            maosoft Marcelo Adrian Oliveto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: