arangosh> db.ids.ensureIndex({ type: "skiplist", fields: [ "myId" ], unique: true });
{
"deduplicate" : true,
"fields" : [
"myId"
],
"id" : "ids/111813",
"isNewlyCreated" : true,
"sparse" : false,
"type" : "skiplist",
"unique" : true,
"code" : 201
}
arangosh> db.ids.save({ "myId": 123 });
{
"_id" : "ids/111816",
"_key" : "111816",
"_rev" : "_YYClXii--_"
}
arangosh> db.ids.save({ "myId": 456 });
{
"_id" : "ids/111820",
"_key" : "111820",
"_rev" : "_YYClXim--_"
}
arangosh> db.ids.save({ "myId": 789 });
{
"_id" : "ids/111823",
"_key" : "111823",
"_rev" : "_YYClXim--B"
}
arangosh> db.ids.save({ "myId": 123 });
[ArangoError 1210: unique constraint violated - in index 111813 of type skiplist over ["myId"]; conflicting key: 111816]