arangosh> db.emails.ensureFulltextIndex("content");
{
"fields" : [
"content"
],
"id" : "emails/17248",
"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/17251",
"_key" : "17251",
"_rev" : "_WnWW9Rq--_"
}
arangosh> db.emails.save({ content:
........> "Hello Charlie, do Alice and Bob know about it?"});
{
"_id" : "emails/17255",
"_key" : "17255",
"_rev" : "_WnWW9Ru--_"
}
arangosh> db.emails.save({ content: "I think they don't know. Regards, Eve" });
{
"_id" : "emails/17258",
"_key" : "17258",
"_rev" : "_WnWW9Ry--_"
}
arangosh> db.emails.fulltext("content", "charlie,|eve").toArray();
[
{
"_key" : "17255",
"_id" : "emails/17255",
"_rev" : "_WnWW9Ru--_",
"content" : "Hello Charlie, do Alice and Bob know about it?"
},
{
"_key" : "17258",
"_id" : "emails/17258",
"_rev" : "_WnWW9Ry--_",
"content" : "I think they don't know. Regards, Eve"
}
]