mapReduce

@JvmName(name = "mapReduceAsT")
fun mapReduce(mapFunction: String, reduceFunction: String): MapReduceFlow<T>

Deprecated

Map Reduce has been deprecated. Use Aggregation instead

Replace with

Aggregates documents according to the specified map-reduce function.

Return

an iterable containing the result of the map-reduce operation

Parameters

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.

See also


inline fun <R : Any> mapReduce(mapFunction: String, reduceFunction: String): MapReduceFlow<R>

Deprecated

Map Reduce has been deprecated. Use Aggregation instead

Replace with

Aggregates documents according to the specified map-reduce function.

Return

an iterable containing the result of the map-reduce operation

Parameters

R

the class to decode each resulting document into.

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.

See also


@JvmName(name = "mapReduceAsTWithSession")
fun mapReduce(clientSession: ClientSession, mapFunction: String, reduceFunction: String): MapReduceFlow<T>

Deprecated

Map Reduce has been deprecated. Use Aggregation instead

Replace with

Aggregates documents according to the specified map-reduce function.

Return

an iterable containing the result of the map-reduce operation

Parameters

clientSession

the client session with which to associate this operation

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.

See also


inline fun <R : Any> mapReduce(clientSession: ClientSession, mapFunction: String, reduceFunction: String): MapReduceFlow<R>

Deprecated

Map Reduce has been deprecated. Use Aggregation instead

Replace with

Aggregates documents according to the specified map-reduce function.

Return

an iterable containing the result of the map-reduce operation

Parameters

R

the class to decode each resulting document into.

clientSession

the client session with which to associate this operation

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.

See also


fun <R : Any> mapReduce(mapFunction: String, reduceFunction: String, resultClass: Class<R>): MapReduceFlow<R>

Deprecated

Map Reduce has been deprecated. Use Aggregation instead

Replace with

Aggregates documents according to the specified map-reduce function.

Return

an iterable containing the result of the map-reduce operation

Parameters

R

the class to decode each resulting document into.

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.

resultClass

the target document type of the iterable.

See also


fun <R : Any> mapReduce(clientSession: ClientSession, mapFunction: String, reduceFunction: String, resultClass: Class<R>): MapReduceFlow<R>

Deprecated

Map Reduce has been deprecated. Use Aggregation instead

Replace with

Aggregates documents according to the specified map-reduce function.

Return

an iterable containing the result of the map-reduce operation

Parameters

R

the class to decode each resulting document into.

clientSession

the client session with which to associate this operation

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.

resultClass

the target document type of the iterable.

See also