arangosh> db.ids.ensureIndex({ type: "persistent", fields: [ "myId" ], unique: true }); { "deduplicate" : true, "fields" : [ "myId" ], "id" : "ids/16375", "isNewlyCreated" : true, "sparse" : false, "type" : "persistent", "unique" : true, "code" : 201 } arangosh> db.ids.save({ "myId": 123 }); { "_id" : "ids/16378", "_key" : "16378", "_rev" : "_W0jzAkW--_" } arangosh> db.ids.save({ "myId": 456 }); { "_id" : "ids/16382", "_key" : "16382", "_rev" : "_W0jzAka--_" } arangosh> db.ids.save({ "myId": 789 }); { "_id" : "ids/16385", "_key" : "16385", "_rev" : "_W0jzAka--B" } arangosh> db.ids.save({ "myId": 123 }); [ArangoError 1210: unique constraint violated - in index 16375 of type persistent over ["myId"]; conflicting key: 16378]