Sử dụng Text Index trong MongoDB
>db.posts.find({$text:{$search:"tutorialspoint"}}){
"_id": ObjectId("53493d14d852429c10000002"),
"post_text": "enjoy the mongodb articles on tutorialspoint",
"tags": ["mongodb", "tutorialspoint"]
}
{
"_id": ObjectId("53493d1fd852429c10000003"),
"post_text": "writing tutorials on mongodb",
"tags": ["mongodb", "tutorial"]
}Last updated