arangosh> db.test.ensureIndex({ type: "hash", fields: [ "a", "b.c" ], unique: true }); { "id" : "test/1152981714", "type" : "hash", "fields" : [ "a", "b.c" ], "selectivityEstimate" : 1, "unique" : true, "sparse" : false, "isNewlyCreated" : true, "code" : 201 } arangosh> db.test.save({ a : 1, b : { c : 1 } }); { "_id" : "test/1153309394", "_rev" : "1153309394", "_key" : "1153309394" } 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/1153768146", "_rev" : "1153768146", "_key" : "1153768146" } arangosh> db.test.save({ a : 1 }); [ArangoError 1210: cannot create document, unique constraint violated]