-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
163
In view resolution we need to translate all the parts of a .find() query into equivalent aggregation stages. Currently $near and $nearSphere aren't supported on views because syntactically they're part of the .find() predicate, which becomes a $match, but semantically they also sort the results, which $match can't.
We should be able to translate any .find() predicate to a combination of $geoNear and $match stages. We'll need to make $geoNear's 'distanceField' argument optional.
- is duplicated by
-
SERVER-59612 Fix typo in the test tags for geo.js
- Closed
- is related to
-
SERVER-35581 Don't mandate the use of "distanceField" in $geoNear
- In Progress
-
SERVER-57932 Improve error message for $near in aggregation to suggest workarounds
- Closed
- related to
-
SERVER-63146 Complete TODO listed in SERVER-58443
- Closed