arangosh> db.ids.ensureIndex({ type: "skiplist", fields: [ "myId" ], unique: true });
{
"deduplicate" : true,
"fields" : [
"myId"
],
"id" : "ids/74835",
"isNewlyCreated" : true,
"name" : "idx_1646382081998061568",
"selectivityEstimate" : 1,
"sparse" : false,
"type" : "skiplist",
"unique" : true,
"code" : 201
}
arangosh> db.ids.save({ "myId": 123 });
{
"_id" : "ids/74839",
"_key" : "74839",
"_rev" : "_ZXF6dYC--_"
}
arangosh> db.ids.save({ "myId": 456 });
{
"_id" : "ids/74841",
"_key" : "74841",
"_rev" : "_ZXF6dYG---"
}
arangosh> db.ids.save({ "myId": 789 });
{
"_id" : "ids/74843",
"_key" : "74843",
"_rev" : "_ZXF6dYG--A"
}
arangosh> db.ids.save({ "myId": 123 });
[ArangoError 1210: unique constraint violated - in index idx_1646382081998061568 of type skiplist over 'myId'; conflicting key: 74839]