arangosh> db.ids.ensureIndex({ type: "skiplist", fields: [ "name.first", "name.last" ], unique: true });
{
"deduplicate" : true,
"fields" : [
"name.first",
"name.last"
],
"id" : "ids/18259",
"isNewlyCreated" : true,
"sparse" : false,
"type" : "skiplist",
"unique" : true,
"code" : 201
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
{
"_id" : "ids/18262",
"_key" : "18262",
"_rev" : "_WgE9Xm6--_"
}
arangosh> db.ids.save({ "name" : { "first" : "jens", "last": "jensen" }});
{
"_id" : "ids/18266",
"_key" : "18266",
"_rev" : "_WgE9Xn---_"
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "jensen" }});
{
"_id" : "ids/18269",
"_key" : "18269",
"_rev" : "_WgE9XnC--_"
}
[ArangoError 1210: unique constraint violated - in index 18259 of type skiplist over ["name.first","name.last"]; conflicting key: 18262]