geoNear aggregation pipeline stage

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Major - P3
    • 2.3.2
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Fully Compatible
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The $geoNear operator will be based on the geoNear command, supporting the same arguments with the same defaults as the command with the following exceptions:

      1) Arguments are nested as in {$geoNear: {near:[10,20], spherical:true}}
      2) limit is supported as a synonym for num (SERVER-5113).
      3) num/limit can also be set by a following $limit
      4) The matching documents are passed through the pipeline without a wrapper
      5) A new required argument "distanceField" specifies a field name to inject the distance into. This could be optional on non-sharded systems, but I think it is best to require it everywhere.
      6) includeLocs is still optional, but also takes a field to inject the location into.

      geoNear command is documented here http://docs.mongodb.org/manual/reference/command/geoNear/

              Assignee:
              Mathias Stearn
              Reporter:
              Mathias Stearn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: