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