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

阅读 17

2024-09-18

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)

0 0 举报