arangosh> db.emails.ensureFulltextIndex("content");
{
"fields" : [
"content"
],
"id" : "emails/15555",
"isNewlyCreated" : true,
"minLength" : 2,
"sparse" : true,
"type" : "fulltext",
"unique" : false,
"code" : 201
}
arangosh> db.emails.save({ content:
........> "Hello Alice, how are you doing? Regards, Bob"});
{
"_id" : "emails/15558",
"_key" : "15558",
"_rev" : "_XiAwT8m--_"
}
arangosh> db.emails.save({ content:
........> "Hello Charlie, do Alice and Bob know about it?"});
{
"_id" : "emails/15562",
"_key" : "15562",
"_rev" : "_XiAwT8m--B"
}
arangosh> db.emails.save({ content: "I think they don't know. Regards, Eve" });
{
"_id" : "emails/15565",
"_key" : "15565",
"_rev" : "_XiAwT8q--_"
}
arangosh> db.emails.fulltext("content", "charlie,|eve").toArray();
[
{
"_key" : "15562",
"_id" : "emails/15562",
"_rev" : "_XiAwT8m--B",
"content" : "Hello Charlie, do Alice and Bob know about it?"
},
{
"_key" : "15565",
"_id" : "emails/15565",
"_rev" : "_XiAwT8q--_",
"content" : "I think they don't know. Regards, Eve"
}
]