84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
想实现一个mongodb 不区分大小写的查询,比如,查询字段为key,key的值为 Rundown,现在想实现的查询的方式key能匹配Rundown ,rundown,但不会匹配Rundown1。请问这个该如何实现了。ps:我用的是mongdb的java 驱动开发,
Use regular expressions, such as:
db.xxx.find( { key: /^rundown$/i } );
{"key" : { "$regex" : "^rundonw1$",$options:"i"}}
The purpose of writing this is to be used in Criteria.regex("^rundonw1$","i").
Use regular expressions, such as:
{"key" : { "$regex" : "^rundonw1$",$options:"i"}}
The purpose of writing this is to be used in Criteria.regex("^rundonw1$","i").