arangosh> db.emails.ensureFulltextIndex("content");
{
"fields" : [
"content"
],
"id" : "emails/110363",
"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/110366",
"_key" : "110366",
"_rev" : "_Y2g67uW--_"
}
arangosh> db.emails.save({ content:
........> "Hello Charlie, do Alice and Bob know about it?"});
{
"_id" : "emails/110370",
"_key" : "110370",
"_rev" : "_Y2g67ua--_"
}
arangosh> db.emails.save({ content: "I think they don't know. Regards, Eve" });
{
"_id" : "emails/110373",
"_key" : "110373",
"_rev" : "_Y2g67ua--B"
}
arangosh> db.emails.fulltext("content", "charlie,|eve").toArray();
[
{
"_key" : "110370",
"_id" : "emails/110370",
"_rev" : "_Y2g67ua--_",
"content" : "Hello Charlie, do Alice and Bob know about it?"
},
{
"_key" : "110373",
"_id" : "emails/110373",
"_rev" : "_Y2g67ua--B",
"content" : "I think they don't know. Regards, Eve"
}
]