-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Minor - P4
-
Affects Version/s: None
-
Labels:None
At https://docs.mongodb.com/manual/core/index-multikey/#unique-multikey-index:
db.a.createIndex({myArray: 1}, {unique:true}) db.a.insertOne({myArray: ['a', 'b']) db.a.insertOne({myArray: ['b', 'c']) // this will fail because another doc has 'b' already