- Each iteration of the Map step applies only to one document. However, there is a lot of flexibility in terms of what gets emitted in iteration. It can either emit multiple items, or none if certain conditions are not met.
- It is also completely up to the user to create the appropriate key in the Map step. The key thing is that all items with the same key (regardless of which document it originated from) all funnels into the same Reduce iteration eventually (it is possible for e.g. 200 values to be reduce to 1 value in multiple steps, with the reduce output from previous steps appearing in the list as one of the items).
- The Reduce function will not be called for keys that have single values. This means that the same object structure should be used throughout the process.
- There is a "scope" attribute which can be used for global parameters.
My online tech scrapbook where I keep my notes in case I need to look them up later
Tuesday, April 22, 2014
MongoDB MapReduce Notes
A few things that stumped me for a while and took me some time to figure out:
Labels:
mongodb
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment