Top "Mongodb-query" questions

This tag is for questions related to querying and updating MongoDB collections, either through the mongo shell or using a programming language driver.

How to join multiple collections with $lookup in mongodb

I want to join more than two collections in MongoDB using the aggregate $lookup. Is it possible to join? Give …

mongodb join mongodb-query
Query Mongodb on month, day, year... of a datetime

I'm using mongodb and I store datetime in my database in this way for a date "17-11-2011 18:00" I store: …

python mongodb datetime mongodb-query pymongo
how to convert string to numerical values in mongodb

I am trying to convert a string that contains a numerical value to its value in an aggregate query in …

mongodb mongodb-query
Converting string to date in mongodb

Is there a way to convert string to date using custom format using mongodb shell I am trying to convert "21/…

mongodb mongodb-query aggregation-framework
How to convert a pymongo.cursor.Cursor into a dict?

I am using pymongo to query for all items in a region (actually it is to query for all venues …

python mongodb dictionary mongodb-query pymongo
Printing Mongo query output to a file while in the mongo shell

2 days old with Mongo and I have a SQL background so bear with me. As with mysql, it is very …

mongodb io mongodb-query mongo-shell
Overflow sort stage buffered data usage exceeds internal limit

Using the code: all_reviews = db_handle.find().sort('reviewDate', pymongo.ASCENDING) print all_reviews.count() print all_reviews[0] print …

mongodb mongodb-query mongodb-indexes
Is there an "upsert" option in the mongodb insert command?

I know this may be a silly question, but I read on an e-book that there is an upsert option …

mongodb mongodb-query
How can I use 'Not Like' operator in MongoDB

I can use the SQL Like Operator using pymongo, db.test.find({'c':{'$regex':'ttt'}}) But how can I …

regex mongodb mongodb-query pymongo sql-like
Mongoose document references with a one-to-many relationship

I'm working on designing a database structure for a new project, and I'm pretty new to MongoDB, and obviously Mongoose. …

node.js mongodb mongoose mongodb-query mongoose-schema