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

Misplaced $maxDistance inside of $near

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Component/s: API
    • Labels:
      None
    • Environment:
      windows 8, windows 2008, mongodb 2.6.0
    • Sprint:
      Sprint 1 April 14 - May 2

      Description

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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: