arangosh> db.ids.ensureIndex({ type: "skiplist", fields: [ "name.first", "name.last" ], unique: true });
{
"id" : "ids/15269",
"type" : "skiplist",
"fields" : [
"name.first",
"name.last"
],
"unique" : true,
"sparse" : false,
"isNewlyCreated" : true,
"code" : 201
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
{
"_id" : "ids/15272",
"_key" : "15272",
"_rev" : "_U-_q21S---"
}
arangosh> db.ids.save({ "name" : { "first" : "jens", "last": "jensen" }});
{
"_id" : "ids/15276",
"_key" : "15276",
"_rev" : "_U-_q21S--_"
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "jensen" }});
{
"_id" : "ids/15279",
"_key" : "15279",
"_rev" : "_U-_q21S--A"
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
[ArangoError 1210: cannot create document, unique constraint violated]