Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
The docs page for aggregations on sharded clusters says the following:
> If the pipeline starts with an exact $match on a shard key, the entire pipeline runs on the matching shard only.
However, aggregations starting with an exact $match on a shard key can still require running on multiple shards if the pipeline contains a $lookup stage, as this requires being run on the primary shard of the cluster.
The statement above should be clarified to note that an exact $match is not sufficient to ensure single shard execution.
A PR to clarify this has already been prepared:
https://github.com/mongodb/docs/compare/master...asya999:patch-81