Mongo

How to write query in mongodb with "like" ?

I want query something as SQL's like query: select * from users where name like '%a%'; How to write the same query in mongodb : This will match all the value that contain "name" a. db.users.find({name: /a/}) //like …

How to Export and Import database using MONGO DB

Exporting from MongoDB : To export the database, simply tell mongodump which database (or collection) you want to export, and where to export it to. Mine was the fairquid database, so my command looks like this: mongodump -d fairquid -o fairquid…

Load More
That is All