Answers
db.Data.find({ $or: [ { title: {$regex: 'test'} }, { intro: {$regex: 'test'} } ] })
可以参考官方文档:
或查询:
http://docs.mongodb.org/manual/reference/operator/query/or/#op._S_or
模糊查询:
http://docs.mongodb.org/manual/reference/operator/query/regex/
不给力啊老湿
answered 11 years, 2 months ago