fun <reified TResult : Any> MongoCollection<*>.mapReduceTyped(mapFunction: String, reduceFunction: String): MapReducePublisher<TResult>
(source)
Aggregates documents according to the specified map-reduce function.
mapFunction
- a JavaScript function that associates or "maps" a value with a key and emits the key and value pair.
reduceFunction
- a JavaScript function that "reduces" to a single object all the values associated with a particular key.
Parameters
Return
an iterable containing the result of the map-reduce operation
fun <reified TResult : Any> MongoCollection<*>.mapReduceTyped(clientSession: ClientSession, mapFunction: String, reduceFunction: String): MapReducePublisher<TResult>
(source)
Aggregates documents according to the specified map-reduce function.
clientSession
- the client session
mapFunction
- a JavaScript function that associates or "maps" a value with a key and emits the key and value pair.
reduceFunction
- a JavaScript function that "reduces" to a single object all the values associated with a particular key.
Parameters
Return
an iterable containing the result of the map-reduce operation