to Collection
Aggregates documents to a collection according to the specified map-reduce function with the given options, which must specify a non-inline result.
Throws
if a collection name to write the results to has not been specified