couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject chaining map reduce in hovercraft
Date Fri, 05 Jun 2009 05:47:21 GMT
I finally got around to writing my map reduce copier. it's still
basic, but what do you think?

I want to put it into trunk as an http call, like:

POST /_snapshot_view

with JSON

{"src":"/srcdb/_design/app/_view/reduce_count", "group_level":2,

Chainable map reduce seems to be one of the most popular requests on
the survey we took, so hopefully this will make the heavy-data crew

There is an implementation here:

What this does is take the results you'd get from query your reduce
view with group=true, and copy them to a new database. Basically you
end up with a database full of docs that look like:

"value": 511

Since they are docs sitting in another CouchDB, you can use more
ordinary CouchDB Map Reduce views on that database to do things like
sort by value, so you can for instance sort tags by popularity, or
days by user activity, etc.


Chris Anderson

View raw message