arangosh> db.ids.ensureIndex({ type: "persistent", fields: [ "myId" ], unique: true }); { "deduplicate" : true, "fields" : [ "myId" ], "id" : "ids/18221", "isNewlyCreated" : true, "sparse" : false, "type" : "persistent", "unique" : true, "code" : 201 } arangosh> db.ids.save({ "myId": 123 }); { "_id" : "ids/18224", "_key" : "18224", "_rev" : "_WgE9W-u--_" } arangosh> db.ids.save({ "myId": 456 }); { "_id" : "ids/18228", "_key" : "18228", "_rev" : "_WgE9W-y--_" } arangosh> db.ids.save({ "myId": 789 }); { "_id" : "ids/18231", "_key" : "18231", "_rev" : "_WgE9W-2--_" } arangosh> db.ids.save({ "myId": 123 }); [ArangoError 1210: unique constraint violated - in index 18221 of type persistent over ["myId"]; conflicting key: 18224]