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