Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
Query Optimization
Description
It would be nice to have syntactic sugar for the following stage which I type all the time:
{$group:{_id:"$field", count:{$sum:1}}}
|
Something like {$countBy:"$field"} would be more readable and be analogous to $count and $sortByCount stages (and would use same field names as sortByCount - i.e. count field for sum)