[DOCS-5973] Clarity Issue: Covered Queries in Sharded Clusters Created: 04/Aug/15  Updated: 26/Jul/18  Resolved: 17/Jan/18

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: William Cross Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 6 years, 4 weeks, 1 day ago

 Description   

Here's the doc

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.



 Comments   
Comment by Githook User [ 17/Jan/18 ]

Author:

{'name': 'kay', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-5973: move the changed in version 3.0 label
Branch: v3.4
https://github.com/mongodb/docs/commit/50824a2cdb6fbcf2251ba2b123d813e8d25bc4f8

Comment by Kay Kim (Inactive) [ 17/Jan/18 ]

The suggested text is not quite correct in the actual limitation, so I just removed the "Changed in version 3.0" from the second paragraph and prefixed the first paragraph with Starting in MongoDB 3.0, ...

Comment by Githook User [ 17/Jan/18 ]

Author:

{'name': 'kay', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-5973: move the changed in version 3.0 label
Branch: master
https://github.com/mongodb/docs/commit/c1d47c9f8421413c2b23acf99d635c3c5fc198e6

Generated at Thu Feb 08 07:51:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.