Writing and Querying MapReduce Views in CouchDB
oreilly.com