MongoDB: Is it possible to make a case-insensitive query?
Asked 07 September, 2021
Viewed 2.8K times
  • 57
Votes

Example:

> db.stuff.save({"foo":"bar"});

> db.stuff.find({"foo":"bar"}).count();
1
> db.stuff.find({"foo":"BAR"}).count();
0

24 Answer