Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CA5529ECD for ; Mon, 30 Jan 2012 16:51:00 +0000 (UTC) Received: (qmail 72820 invoked by uid 500); 30 Jan 2012 16:50:58 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 72783 invoked by uid 500); 30 Jan 2012 16:50:58 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 72775 invoked by uid 99); 30 Jan 2012 16:50:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2012 16:50:58 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jens@couchbase.com designates 206.225.164.32 as permitted sender) Received: from [206.225.164.32] (HELO EXHUB020-5.exch020.serverdata.net) (206.225.164.32) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2012 16:50:50 +0000 Received: from EXVMBX020-1.exch020.serverdata.net ([169.254.4.190]) by EXHUB020-5.exch020.serverdata.net ([206.225.164.32]) with mapi; Mon, 30 Jan 2012 08:50:19 -0800 From: Jens Alfke To: "user@couchdb.apache.org" Date: Mon, 30 Jan 2012 08:50:18 -0800 Subject: Re: Using JavaScript libs in a view's map function Thread-Topic: Using JavaScript libs in a view's map function Thread-Index: Aczfbz+wGI6/qOVXRSStWp/WZ6ScCg== Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_E779350DA30047FDBAE373174E1BD15Ccouchbasecom_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_E779350DA30047FDBAE373174E1BD15Ccouchbasecom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable 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=92s part of the definition of map/reduce that map functions are =93pure= =94 functions without external inputs or side effects. That=92s what allows= them to be parallelized, and what allows Couch to determine when their out= put has been invalidated and needs to be recomputed. In some map/reduce systems you can do what you=92re asking for by way of mu= ltiple levels, where the output of one m/r gets fed into another step; but = CouchDB doesn=92t directly support this. Maybe if you describe in more detail what you=92re trying to do, people can= offer some ideas on how to do it in CouchDB. =97Jens --_000_E779350DA30047FDBAE373174E1BD15Ccouchbasecom_--