incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Using JavaScript libs in a view's map function
Date Mon, 30 Jan 2012 19:42:56 GMT
holy disclaimer batman!

On 30 January 2012 11:50, Jens Alfke <jens@couchbase.com> wrote:
>
> On Jan 30, 2012, at 6:17 AM, Luscus Readbeard wrote:
>
> What I would like to do is to be able to load some other docs or view
> results in the map function in order to make some complex processing.
>
> It’s part of the definition of map/reduce that map functions are “pure” functions
without external inputs or side effects. That’s what allows them to be parallelized, and
what allows Couch to determine when their output has been invalidated and needs to be recomputed.
>
> In some map/reduce systems you can do what you’re asking for by way of multiple levels,
where the output of one m/r gets fed into another step; but CouchDB doesn’t directly support
this.
>
> Maybe if you describe in more detail what you’re trying to do, people can offer some
ideas on how to do it in CouchDB.
>
> —Jens

Mime
View raw message