select *
from job
where
(title LIKE %xxx% OR dsc LIKE %xxx% OR requirements LIKE %xxx% )
AND
(country LIKE %xxx%)
我如何在MongoDB中执行此操作?
答案 0 :(得分:1)
使用它:
db.job.find({
$and : [
{$or : [
{title : \xxx\},
{dsc : \xxx\},
{requirements : \xxx\}
]},
{country : \xxx\}
]
})