Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
Sharding 2022-10-03, Sharding 2022-10-17
Description
Using a sparse or partial index can cause the aggregation command to return the wrong cardinality and frequency since:
- Sparse indexes omit documents that have null/missing index key fields.
- Partial indexes omit documents that do not match the specified filter.
A shard key index can never be sparse or partial so this requirement only affects the candidate key case.