马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- db.getCollection("qlzx_penalties_business_raw").find({
- $expr: {
- $lt: [{ $strLenCP: "$punish_name" }, 5]
- },
- "punish_name_type" : "机构",
- "source_data" : /中国/,
- })
- 解释:
- 1-"source_data" : /中国/ 模糊查询 “中国” 类似 MySQL中的 like "%中国%"
- 2-"punish_name_type" : "机构" 正常查询
- 3- $expr: {$lt: [{ $strLenCP: "$punish_name" }, 5]} “punish_name” 查询内容长度的字段名,$lt 小于,$gt 大于,5 长度
复制代码 运行结果
|