0
点赞
收藏
分享

微信扫一扫

Rust 助力无服务器构筑云计算新引擎

杰克逊爱学习 2024-09-18 阅读 17
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 长度

运行结果 

举报

相关推荐

0 条评论