-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
In the section, "Covered Queries in Sharded Clusters," it says:
An index cannot cover a query on a sharded collection when run against a mongos if the index does not contain the shard key, with the following exception for the _id index: If a query on a sharded collection only specifies a condition on the _id field and returns only the _id field, the _id index can cover the query when run against a mongos even if the _id field is not the shard key.
Changed in version 3.0: In previous versions, an index cannot cover a query on a sharded collection when run against a mongos.
I think it could be clearer, here. I would prefer if the version information were made up front, and then the update clarified that this was no longer a limitation:
For versions earlier than MongoDB 3.0, an index cannot cover a query on a sharded collection when run against a mongos if the index does not contain the shard key, with the following exception for the _id index: If a query on a sharded collection only specifies a condition on the _id field and returns only the _id field, the _id index can cover the query when run against a mongos even if the _id field is not the shard key.
Changed in version 3.0: MongoDB can now cover a query on a sharded collection when run against a mongos.
Probably not a big deal, regardless, as it's not wrong, just a little potentially confusing.