title: mongodb check in that there's one document in map function
body: <p>I am handling aggregated data (mapreduce), and when there's only one doc on the map function, it doesn't send it to reduce. Is there a way to check inside map that there's only one doc or force it through reduce?</p>
  
  <p><strong>UPDATED</strong></p>
  
  <p>As I posted below, the solution to this problem (although with a huge performance loss) is to always calculate the values in map, and add it to the emit object. If the emit passes through reduce than we overwrite the values with the proper group calculations else it will be output as calculated in map.</p>