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