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

For $geoNear, clarify that the "location" field is implicit

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • v1.3.13
    • None
    • manual
    • None

    Description

      In the docs for the $geoNear aggregation operator

      http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/

      it's stated:

      • The collection must have a geospatial index.
      • The $geoNear requires that a collection have at most only one 2d index and/or only one 2dsphere index.

      However, it would be useful to then explicitly state that the location field does not need to be specified to the operator, since the 2d/2dsphere field from the geospatial index is what will (implicitly) be used.

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 16 weeks, 4 days ago