I have a collection containing usernames. If a user searches for "joe", I want it to return "Joe", and any case-different variants (ie "jOe", etc.).
I'm using monk to implement mongodb queries in my node.js application - but the documentation has no mention of case insensitive queries, nor does it have any implementation of collations.
I am aware that regex can be used (and works), but it seems to go against the advice of the mongo documentation. Is there a regexless way of doing this in node.js implementations of MongoDB?
I'm unsure as to how I would implement a query like this - Any help would be appreciated.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.