toCollection

abstract suspend fun toCollection()

Aggregates documents to a collection according to the specified map-reduce function with the given options, which must specify a non-inline result.