https://stackoverflow.com/questions/7101703/how-do-i-make-case-insensitive-queries-on-mongodb/7101868
db.collection.find( {"name_lower":
{ $regex: new RegExp("^" + thename.toLowerCase(), "i") } }
);
db.collection.find( {"name_lower":
{ $regex: new RegExp("^" + thename.toLowerCase(), "i") } }
);
No comments:
Post a Comment