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