arangosh> db.ids.ensureIndex({ type: "skiplist", fields: [ "name.first", "name.last" ], unique: true });
{
"id" : "ids/15251",
"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/15254",
"_key" : "15254",
"_rev" : "_U-_q20m---"
}
arangosh> db.ids.save({ "name" : { "first" : "jens", "last": "jensen" }});
{
"_id" : "ids/15258",
"_key" : "15258",
"_rev" : "_U-_q20m--_"
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "jensen" }});
{
"_id" : "ids/15261",
"_key" : "15261",
"_rev" : "_U-_q20m--A"
}
[ArangoError 1210: cannot create document, unique constraint violated]