Does MongoDB ignore calling Reduce function when Map emits only one result?

43 views
Skip to first unread message

Rmon

unread,
Jul 27, 2012, 1:21:44 AM7/27/12
to mongod...@googlegroups.com

I notice that when the Map function returns one entry, then Reduce doesn't get called.

  1. Is this the default behaviour?
  2. Can MongoDB be forced to always call the Reduce function?

Emily S

unread,
Jul 27, 2012, 11:28:01 AM7/27/12
to mongod...@googlegroups.com
If the map function emits a single document for a given key, the reduce function will not be called.

This is by design.  You can see the above note and read further documentation here:
Reply all
Reply to author
Forward
0 new messages