Create
Learn
Share

Couchdb Map-Reduce

rename
Updated 2009-10-04 19:44

Summary

Memorize core concepts of how couchdb implements map-reduce.

Basic

Question Answer
function that returns output from viewemit()
emit() parameterskey, value
views must be...referentially transparent
reduce function must be...referentially transparent, and able to reduce on it's own output (and get the same answer)
referentially transparentgiven same input, always gives same output
memorize

Advanced

Question Answer
reduce() params (in general)keys, values, rereduce
rereduce parameterwhether input comes from another call to reduce() (boolean)
reduce() params (when rereduce false)[[key,id]...], [value...], false
reduce() params (when rereduce true)null, [reduced...], true
groups of roughly _________ are passed into reduce()15
output flows from _____ to _____ to _____map, reduce(...,false), reduce(...,true)
reduce() outputs...whatever structure it wants
memorize