我正在使用MongoDB和MongoDB的C#驱动程序.
我最近发现MongoDB中的所有查询都区分大小写.如何进行不区分大小写的搜索?
我找到了一种方法:
Query.Matches( "FirstName", BsonRegularExpression.Create(new Regex(searchKey,RegexOptions.IgnoreCase)));
.net c# case-insensitive mongodb mongodb-.net-driver
.net ×1
c# ×1
case-insensitive ×1
mongodb ×1
mongodb-.net-driver ×1