关于mongodb按照字段模糊查询方法

 

模糊查询:tname包含某个关键字测试'

cd /opt/soft/mongodb/bin

./mongo --host 192.168.0.1  --port 17017  test

db.test_info.find({"tname": {$regex: '测试', $options:'i'}}) 

db.test_info.find({"tname": {$regex:/测试.*/i}}) 

相关文章:

  • 2021-11-16
  • 2022-01-19
  • 2021-11-29
  • 2022-12-23
  • 2021-06-23
  • 2021-08-04
  • 2022-12-23
  • 2021-08-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2021-08-25
  • 2022-12-23
相关资源
相似解决方案