create
learn
share

Couchdb Map-Reduce

edit

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
start learning
start learning

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
start learning
start learning
blog comments powered by Disqus