db.articles.find({ $text: { $search: {"word"} } }).pretty()db.articles.find({ $text: { $search: {"\"10.5534/wjmh.2016.34.3.200\""} } }).pretty() "winningPlan" : {
"stage" : "TEXT",
"indexPrefix" : {
},
"indexName" : "Article_TextIndex",
"parsedTextQuery" : {
"terms" : [
"10",
"200",
"2016",
"3",
"34",
"5534",
"wjmh"
],
"negatedTerms" : [ ],
"phrases" : [
"10.5534/wjmh.2016.34.3.200"
],
"negatedPhrases" : [ ]
},
Does someone know how to fix that? Or what can I do with it? Or maybe I do something wrong?
Hi Oleg,
The text index stores one index entry for each unique stemmed term in each indexed field for each document in the collection. Although it’s a phrase search, the index entries are tokenised and stemmed version of the field value. See more info on Text Indexes
What’s your use case ? Looking at the value it looks like a code string. Would it be possibly to store in a separate field with a different index type ?
Could you provide an example document ? Also, which MongoDB version are you using ?
Regards,
Wan.