public MapReduceOutput mapReduce ( final String map , final String reduce , final String outputTarget , final MapReduceCommand . OutputType outputType , final DBObject query , final ReadPreference readPreference ) { MapReduceCommand command = new MapReduceCommand ( this , map , reduce , outputTarget , outputType , query ) ; command . setReadPreference ( readPreference ) ; return mapReduce ( command ) ; }
Allows you to run map - reduce aggregation operations over a collection and saves to a named collection .