Details
-
Question
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
Hi, I know that regex queries are not allowed with collation indexes, as well explained in this ticket https://jira.mongodb.org/browse/SERVER-29865.
But here is my question: How can I search for a given word in the middle of a string?
For instance, suppose I have a field "Name": "Lílian Magalhães", how can I find it by only typing "Magalhae".
I've tried this, but with no luck so far:
| db.users.find({$and: [{Name: {$gte: "Magalhae"}}, \{Name: {$lt: "Magalhaf"}}]}).collation({locale: "pt", strength: 1}) |