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