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