Top "Mongo-shell" questions

The mongo shell is an interactive JavaScript shell for MongoDB, and is part of all MongoDB distributions.

Cannot use commands write mode error, Degrading to compatibility mode

I just play with mongo shell and came across with Cannot use commands write mode, degrading to compatibility mode. I …

mongodb mongo-shell
Specify which database to use in mongodb .js script

I just want to run a .js script against a particular mongodb database, but can't seem to get the correct …

mongodb mongo-shell
extract subarray value in mongodb

MongoDB noob here... I have a collection as follows... > db.students.find({_id:22},{scores:[{type:'exam'}]}).pretty() { "_id" : 22, "scores" : [ { "…

mongodb mongo-shell
How do I add another value to a dictionary in MongoDB?

Here's an example of what I'm trying to do, as I can't explain what I mean. I execute this in …

shell mongodb mongo-shell
Is it 100 million documents too much?

Well, I am new to mongo and today morning I had a (bad) idea. I was playing around with indexes …

mongodb mongo-shell
MongoDB convert string type to float type

Following the suggestions over here MongoDB: How to change the type of a field? I tried to update my collection …

mongodb mongo-shell
Install Only Mongo Client/Shell - not MongoDB on Windows

I found exactly same question for RHEL: (my question is for Windows) Install ONLY mongo shell, not mongodb Is there …

mongodb mongo-shell
Iterate over all Mongo database

I'm relatively new to MongoDB and I've not been able to find a solution for what I'm looking for. I …

mongodb mongodb-query mongo-shell
How to retrieve the documents whose values ending with a particular character in mongoDB

I inserted the documents into a particular database in mongoDB. for example db.employee.insert({name:"nithin",age:22}) db.employee.…

mongodb mongo-shell
Connect to a specific database by default in mongodb

I am running a mongodb on a linux box. So every time I connect to it from the console (typing …

mongodb mongo-shell