arangosh> db.ids.ensureIndex({ type: "skiplist", fields: [ "name.first", "name.last" ], unique: true });
{
"fields" : [
"name.first",
"name.last"
],
"id" : "ids/346902088",
"sparse" : false,
"type" : "skiplist",
"unique" : true,
"isNewlyCreated" : true,
"code" : 201
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
{
"_id" : "ids/347229768",
"_rev" : "347229768",
"_key" : "347229768"
}
arangosh> db.ids.save({ "name" : { "first" : "jens", "last": "jensen" }});
{
"_id" : "ids/347426376",
"_rev" : "347426376",
"_key" : "347426376"
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "jensen" }});
{
"_id" : "ids/347622984",
"_rev" : "347622984",
"_key" : "347622984"
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
[ArangoError 1210: cannot create document, unique constraint violated]