Answer the question
In order to leave comments, you need to log in
How to index a collection with strings in different languages?
Let's say we have a User collection. It has a name field. One user has name: 'Vasya', and the second one has name: 'Vasya'.
I put the text index on the name field and mongo swears.
What can you think of?
The index is needed so that you can search for matches by characters
. You can, of course, use $regex for this to search for matches by characters, but I do not think that this will be fast in the long run.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question