How do you do a query like the one below, where I want hotels in London OR hotels which have hilton in their name?
This query db.hotels.find({$where : "name = /hilton/i || city = /london/i"})
gives such an error error: { "$err" : "$where compile error" }
Both queries separately work ok: db.hotels.find({$where : "city = /london/i"}) db.hotels.find({$where : "name = /hilton/i"})