-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Query Optimization
If $group accepted $reduce as accumulator, it would allow expressing any and all accumulator operations that we don't have implemented.
Proposed syntax:
{$group:{_id:<expr>, g:{$reduce:{ input:<expr>, initialValue:<expr>, in:<expr> // using "$$value" and "$$this" same as the $reduce expression } } } }
- is related to
-
SERVER-4437 aggregation: support windowing operation on pipelines
- Closed
-
SERVER-16284 Allow for $pushall / $push with $each to allow pushing all elements of array in $group
- Closed
- related to
-
SERVER-29161 Ability to access previous document in $group aggregation
- Closed