Reputation: 1
select *
from job
where
(title LIKE %xxx% OR dsc LIKE %xxx% OR requirements LIKE %xxx% )
AND
(country LIKE %xxx%)
How can I do this in MongoDB?
Upvotes: 0
Views: 53
Reputation: 956
use this:
db.job.find({
$and : [
{$or : [
{title : \xxx\},
{dsc : \xxx\},
{requirements : \xxx\}
]},
{country : \xxx\}
]
})
Upvotes: 1