mirror of https://gitee.com/bigwinds/arangodb
39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
arangosh> db.emails.ensureFulltextIndex("content").id;
|
|
emails/799615139
|
|
arangosh> db.emails.save({ content: "Hello Alice, how are you doing? Regards, Bob" });
|
|
{
|
|
"error" : false,
|
|
"_id" : "emails/799877283",
|
|
"_rev" : "799877283",
|
|
"_key" : "799877283"
|
|
}
|
|
arangosh> db.emails.save({ content: "Hello Charlie, do Alice and Bob know about it?" });
|
|
{
|
|
"error" : false,
|
|
"_id" : "emails/800139427",
|
|
"_rev" : "800139427",
|
|
"_key" : "800139427"
|
|
}
|
|
arangosh> db.emails.save({ content: "I think they don't know. Regards, Eve" });
|
|
{
|
|
"error" : false,
|
|
"_id" : "emails/800336035",
|
|
"_rev" : "800336035",
|
|
"_key" : "800336035"
|
|
}
|
|
arangosh> db.emails.fulltext("content", "charlie,|eve").toArray();
|
|
[
|
|
{
|
|
"_id" : "emails/800139427",
|
|
"_key" : "800139427",
|
|
"_rev" : "800139427",
|
|
"content" : "Hello Charlie, do Alice and Bob know about it?"
|
|
},
|
|
{
|
|
"_id" : "emails/800336035",
|
|
"_key" : "800336035",
|
|
"_rev" : "800336035",
|
|
"content" : "I think they don't know. Regards, Eve"
|
|
}
|
|
]
|