I want to query something with SQL\'s like query:
like
SELECT * FROM users WHERE name LIKE \'%m%\'
How to do I achieve the same in
You can use the new feature of 2.6 mongodb:
db.foo.insert({desc: "This is a string with text"}); db.foo.insert({desc:"This is a another string with Text"}); db.foo.ensureIndex({"desc":"text"}); db.foo.find({ $text:{ $search:"text" } });