-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Query Integration
-
Minor Change
-
200
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.
- depends on
-
SERVER-33323 Refactor $mergeCursors stage to allow it to be used to merge cursors on mongos
- Closed
- has to be done after
-
SERVER-35043 Remove geoNear command
- Closed
- is depended on by
-
SERVER-97919 Enable featureFlagRankFusionBasic by default
- Open
-
SERVER-97616 Remove 'distanceField' requirement for $geoNear in time-series collections
- Backlog
-
SERVER-98529 Add e2e test using $geoNear + $rankFusion together
- In Progress
-
COMPASS-8714 Investigate changes in SERVER-35581: Don't mandate the use of "distanceField" in $geoNear
- Needs Triage
-
TOOLS-3726 Investigate changes in SERVER-35581: Don't mandate the use of "distanceField" in $geoNear
- Needs Triage
-
SERVER-97654 Fuzzer changes for new $geoNear syntax
- Backlog
- is related to
-
SERVER-97616 Remove 'distanceField' requirement for $geoNear in time-series collections
- Backlog
- related to
-
SERVER-58443 Allow $near/$nearSphere on a view
- Backlog
-
SERVER-93613 Investigate if we should remove support for sorting by {$meta: "geoNearDistance"}
- Backlog