-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: 6.0.9
-
Component/s: Aggregation Framework
-
Query Optimization
-
ALL
-
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