Details
-
Task
-
Resolution: Cannot Reproduce
-
Minor - P4
-
None
-
None
-
2
Description
https://www.mongodb.com/docs/manual/core/aggregation-pipeline-optimization/#indexes
In this section, I was expecting to find the list of stages that completely prevent the use of indexes further down the pipeline.
For example I was convinced that $project and $unset were preventing any indexes from being used based on the documentation but I was surprised to see that these 2 pipelines can actually both use an index on {name:1}.
db.c.explain(true).aggregate([{"$project": {"age":0}},{"$match": {name:"Max"}}]) |
db.c.explain(true).aggregate([{"$unset": "age"},{"$match": {name:"Max"}}]) |
Can we improve the doc to be more precise?
Thanks!