I want to query something with SQL\'s like
query:
SELECT * FROM users WHERE name LIKE \'%m%\'
How to do I achieve the same in
Like Query would be as shown below
db.movies.find({title: /.*Twelve Monkeys.*/}).sort({regularizedCorRelation : 1}).limit(10);
for scala ReactiveMongo api,
val query = BSONDocument("title" -> BSONRegex(".*"+name+".*", "")) //like
val sortQ = BSONDocument("regularizedCorRelation" -> BSONInteger(1))
val cursor = collection.find(query).sort(sortQ).options(QueryOpts().batchSize(10)).cursor[BSONDocument]