Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-8714

Investigate changes in SERVER-35581: Don't mandate the use of "distanceField" in $geoNear

    • Type: Icon: Investigation Investigation
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Developer Tools

      Original Downstream Change Summary

      The $geoNear distanceField argument is now optional for queries on non-timeseries collections.

      Description of Linked Ticket

      The $geoNear stage requires that "distanceField" is specified. Presumably, this was required to allow $geoNear to work in a sharded cluster, as mongos must take the results from each shard and merge them in ascending order of distance. However, users that aren't interested in the actual distance will have to project out the field in their results.

      When SERVER-35043 is complete, DocumentSourceGeoNearCursor could ensure that the sort key is set to be the computed distance without requiring that "distanceField" is actually added to the output.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: