incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <>
Subject Re: Is is possible to evaluate a view on top of another view?
Date Sun, 03 Aug 2008 21:35:14 GMT
On Fri, Aug 1, 2008 at 2:44 PM, Demetrius Nunes
<> wrote:
> Does it make sense do evaluate a view on top of another previously computed
> view?

That's a standard pattern in map/reduce programming. CouchDB doesn't
support it out of the box (managing the cache-expiry on the nested
views is the big challenge).

I've created a script that copies the map index of a view into another
database, for further processing.

remap.rb uses CouchRest::Pager to iterate through each unique key in a
view and copy its values to the target database. The only downside is
that you have to drop and recreate the target db when you have new

We use remapping in my current project to speed up queries that would
otherwise involve a huge client-side query-time join.

Chris Anderson

View raw message