KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How use sql "like" in PyMongo? >>> db.houses.find().count() 11616 >>> db.houses.find({"hid":u"16999"}).count() 1 >>> db.houses.find({"hid":u"/9/"}).count() 0 The documentation says that sql "like" ( SELECT * FROM users WHERE name LIKE "%Joe%" ) in MongoDB is db.users.find ({name:/Joe/}) . If you specify a query directly to the cli-client interface mongodb, then everything works correctly, but does not work in pymongo. What is the problem? Thanks.
Tags (comma-separated)
Save Edits
Cancel