collections - Mongodb Java MapReduce getOutputCollection -


i don't know outputtypes. i'm trying this:

output=collection.mapreduce(map,reduce,null,   mapreducecommand.outputtype.inline,null); collection=output.getoutputcollection(); 

but collection null, because of inline output type. need reduced collection because need reduce further. how this?

i found solution :d works

output=collection.mapreduce(map,reduce,"mymap",mapreducecommand.outputtype. reduce,null); collection=output.getoutputcollection();

note cannot store in same target "mymap" again , again. have use different name when looping "mymap".concat(integer.tostring(i))


Comments