This wrapper class is used in it's place, and passed directly to a db.runCommand call.
input
the collection name to run the map reduce on
map
the map function (JSFunction is just a type alias for String)
reduce
the reduce function (JSFunction is just a type alias for String)
output
(optional) the location of the result of the map-reduce operation, defaults to inline.
You can output to a collection, output to a collection with an action, or output inline.
query
(optional) the selection criteria for the documents input to the map function.
sort
(optional) the input documents, useful for optimization.
limit
(optional) the maximum number of documents to return from the collection before map reduce
finalizeFunction
(optional) the finalize function (JSFunction is just a type alias for String)
jsScope
(optional) global variables that are accessible in the map, reduce and finalize functions
verbose
(optional) include the timing information in the result information
maxTime
(optional) the maximum duration that the server will allow this operation to execute before killing it
Case class for invoking MongoDB mapReduces.
This wrapper class is used in it's place, and passed directly to a db.runCommand call.
the collection name to run the map reduce on
the map function (JSFunction is just a type alias for String)
the reduce function (JSFunction is just a type alias for String)
(optional) the location of the result of the map-reduce operation, defaults to inline. You can output to a collection, output to a collection with an action, or output inline.
(optional) the selection criteria for the documents input to the map function.
(optional) the input documents, useful for optimization.
(optional) the maximum number of documents to return from the collection before map reduce
(optional) the finalize function (JSFunction is just a type alias for String)
(optional) global variables that are accessible in the map, reduce and finalize functions
(optional) include the timing information in the result information
(optional) the maximum duration that the server will allow this operation to execute before killing it
The MongoDB Map/Reduce Documentation