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

Allow $geoNear on collections with more than one 2dsphere/2d index

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Aggregation Framework, Geo
    • Labels:
      None

      Description

      $geoNear command requires that a collection have at most only one 2d index and/or only one 2dsphere

      I guess that mongodb implicitly takes location field from index. The problem is that I have two location fields in collection (border and center point). Both fields have 2dsphere index. I want to query only center points with $geoNear, but this limitation does not allow me to do this.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-query Backlog - Query Team (Inactive)
              Reporter:
              kazankov Sergey Kazankov
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: