-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 6.0.9
-
Component/s: Aggregation Framework
-
Query Optimization
I was using the aggregation stage $count and noticed that if the input dataset was empty that $count does not return anything.
I was expecting it to return 0.
There is nothing specified in the docs to expect this behaviour.
https://www.mongodb.com/docs/manual/reference/operator/aggregation/count/
- related to
-
SERVER-54958 Empty result when counting from empty collection in aggregation
- Backlog