arangosh> db.test.ensureIndex({ type: "hash", fields: [ "a", "b.c" ], unique: true }); { "fields" : [ "a", "b.c" ], "id" : "test/345329224", "selectivityEstimate" : 1, "sparse" : false, "type" : "hash", "unique" : true, "isNewlyCreated" : true, "code" : 201 } arangosh> db.test.save({ a : 1, b : { c : 1 } }); { "_id" : "test/345656904", "_rev" : "345656904", "_key" : "345656904" } arangosh> db.test.save({ a : 1, b : { c : 1 } }); [ArangoError 1210: cannot create document, unique constraint violated] arangosh> db.test.save({ a : 1, b : { c : null } }); { "_id" : "test/346115656", "_rev" : "346115656", "_key" : "346115656" } arangosh> db.test.save({ a : 1 }); [ArangoError 1210: cannot create document, unique constraint violated]