Details
-
Task
-
Resolution: Fixed
-
Blocker - P1
-
None
-
None
Description
$near, $nearSphere, and $geoNear are not allowed in agg pipelines. This can be confusing for users as they can use these operators in non-agg geo queries. We are editing the error message to better explain why these operators are not permitted in an agg context and suggest workarounds (notably, use $geoWithin in agg pipeline if they don't care about sort). You can follow the conversation on SERVER-57932.
We would like to have documentation describing the workarounds in more detail and link to this documentation in our error message.
Attachments
Issue Links
- is depended on by
-
SERVER-57932 Improve error message for $near in aggregation to suggest workarounds
-
- Closed
-