1
0
Fork 0
arangodb/Documentation/Examples/collectionFulltext.generated

36 lines
973 B
Plaintext

arangosh> db.emails.ensureFulltextIndex("content").id;
emails/461579317
arangosh> db.emails.save({ content: "Hello Alice, how are you doing? Regards, Bob" });
{
"_id" : "emails/461841461",
"_rev" : "461841461",
"_key" : "461841461"
}
arangosh> db.emails.save({ content: "Hello Charlie, do Alice and Bob know about it?" });
{
"_id" : "emails/462038069",
"_rev" : "462038069",
"_key" : "462038069"
}
arangosh> db.emails.save({ content: "I think they don't know. Regards, Eve" });
{
"_id" : "emails/462234677",
"_rev" : "462234677",
"_key" : "462234677"
}
arangosh> db.emails.fulltext("content", "charlie,|eve").toArray();
[
{
"_id" : "emails/462038069",
"_key" : "462038069",
"_rev" : "462038069",
"content" : "Hello Charlie, do Alice and Bob know about it?"
},
{
"_id" : "emails/462234677",
"_key" : "462234677",
"_rev" : "462234677",
"content" : "I think they don't know. Regards, Eve"
}
]