arangosh> db.test.ensureIndex({ type: "hash", fields: [ "a", "b.c" ], unique: true }); { "deduplicate" : true, "fields" : [ "a", "b.c" ], "id" : "test/74778", "isNewlyCreated" : true, "name" : "idx_1646382081983381504", "selectivityEstimate" : 1, "sparse" : false, "type" : "hash", "unique" : true, "code" : 201 } arangosh> db.test.save({ a : 1, b : { c : 1 } }); { "_id" : "test/74782", "_key" : "74782", "_rev" : "_ZXF6dXK--_" } arangosh> db.test.save({ a : 1, b : { c : 1 } }); [ArangoError 1210: unique constraint violated - in index idx_1646382081983381504 of type hash over 'a, b.c'; conflicting key: 74782] arangosh> db.test.save({ a : 1, b : { c : null } }); { "_id" : "test/74786", "_key" : "74786", "_rev" : "_ZXF6dXO---" } arangosh> db.test.save({ a : 1 }); [ArangoError 1210: unique constraint violated - in index idx_1646382081983381504 of type hash over 'a, b.c'; conflicting key: 74786]