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