Skip to content

MONGOID-5590 - Docs: Clarify that shard key dot limitation comes from MongoDB server #5603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
8 changes: 4 additions & 4 deletions docs/reference/sharding.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ configured in the association as the field name:
end

The shard key may also reference a field in an embedded document, by using
the "." character to delimit the field names:
the ``.`` (dot) character to delimit the field names:

.. code-block:: ruby

Expand All @@ -94,9 +94,9 @@ the "." character to delimit the field names:

.. note::

Because the "." character is used to delimit fields in embedded documents,
Mongoid does not currently support shard key fields that themselves
literally contain the "." character.
Because the ``.`` character in shard keys is reserved for referencing embedded document fields,
MongoDB `does not support <https://www.mongodb.com/docs/manual/core/dot-dollar-considerations/>`_
using fields whose names contain the ``.`` character as shard keys.

.. note::

Expand Down