I am using Query.In in c# but i want to make query case insenstive ? Is there any way to make it case insensitive.
Query.In("subjects", new BsonArray(model.subjects))
I want query to match both "Maths" and math.
I am using Query.In in c# but i want to make query case insenstive ? Is there any way to make it case insensitive.
Query.In("subjects", new BsonArray(model.subjects))
I want query to match both "Maths" and math.
Did you try with a Regex? Probably not very efficient, but at least working:
db.collection.find( { "subjects" : { $regex : /yourString/i } } );
Also have a look at: How do I make case-insensitive queries on Mongodb?