-
Type: Task
-
Resolution: Won't Do
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:
-
0.1
Description
Unique indexes on sharded collections can only be enforced on the shard key or a prefix of the shard key.
The Behaviour section of the Unique Index page mentions building unique indexes on replica sets and sharded clusters: https://docs.mongodb.com/manual/core/index-unique/#building-unique-index-on-replica-sets-and-sharded-clusters.
However, the caveats for unique indexes in sharded clusters are a fair distance down the page: https://docs.mongodb.com/manual/core/index-unique/#sharded-clusters-and-unique-indexes.
These two behaviour notes should be adjacent for context.