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