Posts filed under “mongodb”
Map invoke errors when using MongoDB MapReduce
When running MapReduce operations on your data, you must make sure that any fields you refer to within your map operation are available for every document in your collection. If you try a map operation and some documents do not have the required field, you will get the following assertion error when running the command: [...]
Exporting specific documents from MongoDB
MongoDB comes with a useful tool, mongoexport, for exporting collections. However, you can also use it to export specific documents by utilising the query parameter. You can export a single document using it's ObjectId using a command similar to the following: Replace host_name, username, database_name and collection_name with the appropriate values. Replace 4f045677a1ef264746000011 with the [...]