arangosh> db.ids.ensureIndex({ type: "skiplist", fields: [ "name.first", "name.last" ], unique: true });
{
"deduplicate" : true,
"fields" : [
"name.first",
"name.last"
],
"id" : "ids/74215",
"isNewlyCreated" : true,
"name" : "idx_1641835679939821570",
"selectivityEstimate" : 1,
"sparse" : false,
"type" : "skiplist",
"unique" : true,
"code" : 201
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
{
"_id" : "ids/74219",
"_key" : "74219",
"_rev" : "_ZG8Lmga---"
}
arangosh> db.ids.save({ "name" : { "first" : "jens", "last": "jensen" }});
{
"_id" : "ids/74221",
"_key" : "74221",
"_rev" : "_ZG8Lmga--A"
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "jensen" }});
{
"_id" : "ids/74223",
"_key" : "74223",
"_rev" : "_ZG8Lmge---"
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
[ArangoError 1210: unique constraint violated - in index idx_1641835679939821570 of type skiplist over 'name.first, name.last'; conflicting key: 74219]