Answer the question
In order to leave comments, you need to log in
How to organize case insensitive search in mongoDB?
Hello! I have a collection, which consists of about 200 entries (in the future this number will constantly grow). I need to organize a case-insensitive search on the field name and descr .
I read about full-text search, but it is now working in test mode (and it is case-sensitive, despite the fact that the documentation says otherwise).
Please tell me how to quickly organize the search (I think it will be too dreary to install a search engine [the project is not big]).
PS: I am using mongoose and node.js
Answer the question
In order to leave comments, you need to log in
I already asked this question
. Does mongo have fast case-insensitive searches?
The easiest way is to store a lowercase copy of the data in an adjacent field.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question