couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@grabb.it>
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
<demetriusnunes@gmail.com> 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.

http://github.com/jchris/couchrest/tree/master/utils

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
updates.

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

-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message