Maybe this is something I am just missing, but is there any way to change the way the structure of a map reduce comes out in the new collection? For instance, currently I have:
{ "_id" : id_for_item,
"value" : { "item1" : 10,
"item2" : 12,
"item3" : 19
}
}
but I would like something like:
{ "_id" : id_for_item,
"item1" : 10,
"item2" : 12,
"item3" : 19
}
Any help would be appreciated.
No, currently it is not possible. But there is a jira case here. You can vote up and wait. But it for sure will not be done soon, because of even not planned.
If you accessing database though the any driver you can create method that will map m/r results to the structure you want.