couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <>
Subject Re: Using JavaScript libs in a view's map function
Date Mon, 30 Jan 2012 16:50:18 GMT

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

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.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message