This server side query in Meteor returns "No query solutions"
$or: [
{
$text: {
$search: searchValue,
$caseSensitive: false,
$diacriticSensitive: false
}
},
{
content: {$regex: re}
}
]
You must to create text indexes to map each element you wanna search. Example:
db.collection.createIndex({ element1: "text",
element2:'text' })
"To use a $text query in an $or expression, all clauses in the $or array must be indexed."
Restrictions are defined at $text behavior
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With