Timeline for MongoDB: Is it possible to make a case-insensitive query?
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 20, 2020 at 9:12 | history | edited | CommunityBot |
Commonmark migration
|
|
| May 13, 2019 at 5:32 | comment | added | Dan Dascalescu |
Using full-text search is wrong in this case (and potentially dangerous), because the question was about making a case-insensitive query, e.g. username: 'bill' matching BILL or Bill, not a full-text search query, which would also match stemmed words of bill, such as Bills, billed etc.
|
|
| Jan 17, 2018 at 0:37 | comment | added | Tom Mettam | Except regex is significantly slower. Fulltext searching is also slow, but not as slow. The fastest (but more bloated) way would be a separate field which is always set to lowercase. | |
| Aug 28, 2016 at 2:16 | comment | added | JohnnyHK | Good option, but there's nothing more "correct" about using a text index versus a regex, it's just another option. It's overkill for the OP's case. | |
| Aug 27, 2016 at 19:29 | history | answered | vijay | CC BY-SA 3.0 |