DBCollection's mapreduce function returns a MapReduceResult object, which takes in the result of db.runCommand(mapreduce).
If the output is to a different db (i.e. when the "out" parameter is specified with an action instead of a collection name), the result is an object instead of a collection name string.
This is passed into MapReduceResult and stored as the collection name, which in this case gets parsed as the string "[object BSON]". This variable is used by MapReduceResult.find() and MapReduceResult.drop().
The two functions are not documented so maybe they could be cleaned up a bit.
- related to
-
SERVER-42675 M/R Agg: Remove MapReduceResult shell helper
- Closed