Skip to content

Conversation

johnnyshields
Copy link
Contributor

@johnnyshields johnnyshields commented Apr 13, 2023

As per DOCS-15993, the limitation of dot in shard keys comes from MongoDB server, not from Mongoid.

This is a follow-up to #5588

@johnnyshields johnnyshields changed the title MONGOID-5590 - Clarify that shard key dot limitation comes from MongoDB server MONGOID-5590 - Docs: Clarify that shard key dot limitation comes from MongoDB server Apr 13, 2023
@johnnyshields
Copy link
Contributor Author

@jamis ready to merge.

@johnnyshields johnnyshields changed the title MONGOID-5590 - Docs: Clarify that shard key dot limitation comes from MongoDB server [READY FOR REVIEW] MONGOID-5590 - Docs: Clarify that shard key dot limitation comes from MongoDB server Nov 25, 2023
@jamis jamis changed the title [READY FOR REVIEW] MONGOID-5590 - Docs: Clarify that shard key dot limitation comes from MongoDB server MONGOID-5590 - Docs: Clarify that shard key dot limitation comes from MongoDB server Apr 15, 2024
@johnnyshields
Copy link
Contributor Author

@jamis any reason why this doc-only PR can't be merged?

@jamis
Copy link
Contributor

jamis commented May 13, 2024

@johnnyshields -- I think this might not be true anymore. For v6 of the database, I think you're right (https://www.mongodb.com/docs/v6.0/core/dot-dollar-considerations/), but the current docs (https://www.mongodb.com/docs/manual/core/dot-dollar-considerations) make no mention of that restriction. The page you're linking to in the docs seems to flatly contradict the statement that dots and dollar signs are not supported.

If you can find another page for the current server version (v7) that says that dots and dollar signs are forbidden in shard keys at the server level, please do update the PR. Otherwise, I think this PR might be obsolete.

@johnnyshields
Copy link
Contributor Author

johnnyshields commented May 5, 2025

@jamis can you check DOCS-15993? It seems someone closed it, but they didn't clearly state what action they took (at least I can't see it, it might be MongoDB internal only)

I see that dollar fields are definitely not allowed as shard keys:
https://www.mongodb.com/docs/manual/core/dot-dollar-considerations/dollar-prefix/
image

However, the dots page does not say either way.
https://www.mongodb.com/docs/manual/core/dot-dollar-considerations/periods/#std-label-period-field-names

@johnnyshields
Copy link
Contributor Author

Moved to mongodb/docs-mongoid#123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants