Gased_N_A
(Gased N/A)
1
I have searching for a while for a solution, but cannot seem to find anything.
If I change the value from “You” to anything else like “Joe”, “Hot” or anything it works only the word “you”.
Here’s my text index:
Here’s my text index:
tabs.createIndex({'videoTitle': "text", "videoId": "text"},
{
weights:{
videoTitle: 2
},
background: true,
collation: {locale: "simple"}
});
I’m searching using this query:
db.tabs.find({$text: { $search: "You" }})
.projection({})
.sort({_id:-1})
.limit(100)
Gased_N_A
(Gased N/A)
2
I’m not sure if this is a known issue or something, but even if I search on this forum for anything contains you, nothing show up. Try it yourself:
Searching for “Joe”, you will get results, they even include the word “You”
https://www.mongodb.com/community/forums/search?q=Joe
Searching for you, returns nothing:
https://www.mongodb.com/community/forums/search?q=You
steevej
(Steeve Juneau)
3
Gased_N_A
(Gased N/A)
4
So there’s nothing we can do to bypass this? However, the value is not just “You” but “It’s You” even if I search for “It’s You” I get no results.
Gased_N_A
(Gased N/A)
5
I have seen this solution:
db.collection.createIndex(
{ content : "text" },
{ default_language: "none" }
)
But I guess it’s gonna have a bad impact on performance if I change the language settings right?