1
0
Fork 0
arangodb/Documentation/Examples/collectionEnsureIndex.gener...

28 lines
575 B
Plaintext

arangosh> db.test.ensureIndex({ type: "hash", fields: [ "a" ], sparse: true });
{
"id" : "test/1130951563",
"type" : "hash",
"fields" : [
"a"
],
"selectivityEstimate" : 1,
"unique" : false,
"sparse" : true,
"isNewlyCreated" : true,
"code" : 201
}
arangosh> db.test.ensureIndex({ type: "hash", fields: [ "a", "b" ], unique: true });
{
"id" : "test/1131213707",
"type" : "hash",
"fields" : [
"a",
"b"
],
"selectivityEstimate" : 1,
"unique" : true,
"sparse" : false,
"isNewlyCreated" : true,
"code" : 201
}