arangosh> db.ids.ensureIndex({ type: "skiplist", fields: [ "name.first", "name.last" ], unique: true });
{
"id" : "ids/16138",
"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/16141",
"_key" : "16141",
"_rev" : "16141"
}
arangosh> db.ids.save({ "name" : { "first" : "jens", "last": "jensen" }});
{
"_id" : "ids/16145",
"_key" : "16145",
"_rev" : "16145"
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "jensen" }});
{
"_id" : "ids/16148",
"_key" : "16148",
"_rev" : "16148"
}
arangosh> db.ids.save({ "name" : { "first" : "hans", "last": "hansen" }});
[ArangoError 1210: cannot create document, unique constraint violated]