class Mongo::Operation::Commands::MapReduce

A MongoDB map reduce operation.

@note A map/reduce operation can behave like a read and

return a result set, or can behave like a write operation and
output results to a user-specified collection.

@example Create the map/reduce operation.

MapReduce.new({
  :selector => {
    :mapreduce => 'test_coll',
    :map => '',
    :reduce => ''
  },
  :db_name  => 'test_db'
})

Initialization:

param [ Hash ] spec The specifications for the operation.

option spec :selector [ Hash ] The map reduce selector.
option spec :db_name [ String ] The name of the database on which
  the operation should be executed.
option spec :options [ Hash ] Options for the map reduce command.

@since 2.0.0