问题
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