how to flat result after mongodb mapreduce

折月煮酒 提交于 2019-12-12 03:44:50

问题


After playing with MapReduce with MongoDB,

The documents look like:

{_id: { somecola : 123, somecolb : 456 }, value:10 }

I want this format:

{ _id : somerandomcode, somecola : 123, somecolb : 456, value :10 }

Creating a new collection, and foreach + insert can do it but it is too slow, how to do it rapidly?

Thanks

来源:https://stackoverflow.com/questions/14574262/how-to-flat-result-after-mongodb-mapreduce

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!