Answer the question
In order to leave comments, you need to log in
Does mongo have fast case-insensitive searches?
Now if you use the isp: /^Vodafone India$/i regular expression in the query, then the query is executed for 60 seconds.
A direct match of isp: "Vodafone India" search is case-sensitive.
Answer the question
In order to leave comments, you need to log in
try like this:
db.coll.find({ $where: "this.isp.toLowerCase() === 'Vodafone India'.toLowerCase()" })
In version 2.4, full-text search appeared (though only 1 index per collection).
It works very fast in my opinion.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question