-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.1.1
-
Component/s: Aggregation Framework
-
None
-
Fully Compatible
Allow:
db.coll.aggregate({$group:{_id:"$field", docs:{$push:"$$ROOT"}}});
Currently {$push:"$field"} is supported, which accumulates a field from the document. Adding support for "$$ROOT" to expand to the full document would seem to make sense then.
- related to
-
SERVER-9840 Add variables, $$ROOT and $$CURRENT to aggregation and make $let to set them
- Closed