diff --git a/source/core/sharding-shard-key.txt b/source/core/sharding-shard-key.txt index be88e8a08b6..85403f69c32 100644 --- a/source/core/sharding-shard-key.txt +++ b/source/core/sharding-shard-key.txt @@ -91,16 +91,20 @@ recreating an index on just the shard key. Unique Indexes ~~~~~~~~~~~~~~ -For a sharded collection, only the ``_id`` field index and the index on -the shard key or a :term:`compound index` where the shard key is a -:ref:`prefix ` can be :doc:`unique -`: +For a sharded collection, only the index on the shard key or a :term:`compound +index` where the shard key is a :ref:`prefix ` can be +:doc:`unique `: - You cannot shard a collection that has unique indexes on other fields. - You cannot create unique indexes on other fields for a sharded collection. +.. important:: + + The ``_id`` field index can only be :doc:`unique ` + across the sharded cluster if it is the shard key. + Through the use of the unique index on the shard key, MongoDB *can* enforce uniqueness on the shard key values. MongoDB enforces uniqueness on the *entire* key combination, and not individual components of the