How to Update Multiple Array Elements in mongodb
I have a Mongo document which holds an array of elements. I’d like to reset the .handled attribute of all objects in the … Read more
I have a Mongo document which holds an array of elements. I’d like to reset the .handled attribute of all objects in the … Read more
I have a problem when querying mongoDB with nested objects notation: db.messages.find( { headers : { From: “reservations@marriott.com” } } ).count() 0 db.messages.find( … Read more
I know how to list all collections in a particular database, but how do I list all available databases in MongoDB shell? 7 … Read more
How can I (in MongoDB) combine data from multiple collections into one collection? Can I use map-reduce and if so then how? I … Read more
I’d like to get the names of all the keys in a MongoDB collection. For example, from this: db.things.insert( { type : [‘dog’, … Read more
I am looking to get a random record from a huge collection (100 million records). What is the fastest and most efficient way … Read more
{ name: ‘book’, tags: { words: [‘abc’,’123′], lat: 33, long: 22 } } Suppose this is a document. How do I remove “words” … Read more
Suppose you have the following documents in my collection: { “_id”:ObjectId(“562e7c594c12942f08fe4192”), “shapes”:[ { “shape”:”square”, “color”:”blue” }, { “shape”:”circle”, “color”:”red” } ] }, { … Read more
In MongoDB, is it possible to update the value of a field using the value from another field? The equivalent SQL would be … Read more
I’ve been playing around storing tweets inside mongodb, each object looks like this: { “_id” : ObjectId(“4c02c58de500fe1be1000005”), “contributors” : null, “text” : “Hello … Read more