Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7781

geoNear aggregation pipeline stage

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

      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@mongodb.com Mathias Stearn
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: