MongoDB MapReduce - Emit one key/one value doesnt call reduce

后端 未结 5 1914
情深已故
情深已故 2021-02-01 05:56

So i\'m new with mongodb and mapreduce in general and came across this "quirk" (or atleast in my mind a quirk)

Say I have objects in my collection like so:

5条回答
  •  情深已故
    2021-02-01 06:39

    The reduce function combines documents with the same key into one document. If the map function emits a single document for a particular key (as is the case with key 3), the reduce function will not be called.

提交回复
热议问题