Return-Path: Delivered-To: apmail-incubator-couchdb-commits-archive@locus.apache.org Received: (qmail 80304 invoked from network); 1 Dec 2008 11:11:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Dec 2008 11:11:34 -0000 Received: (qmail 51987 invoked by uid 500); 1 Dec 2008 11:11:46 -0000 Delivered-To: apmail-incubator-couchdb-commits-archive@incubator.apache.org Received: (qmail 51950 invoked by uid 500); 1 Dec 2008 11:11:45 -0000 Mailing-List: contact couchdb-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-commits@incubator.apache.org Received: (qmail 51941 invoked by uid 99); 1 Dec 2008 11:11:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2008 03:11:45 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2008 11:10:25 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 3B02B118D9 for ; Mon, 1 Dec 2008 11:11:13 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: couchdb-commits@incubator.apache.org Date: Mon, 01 Dec 2008 11:11:13 -0000 Message-ID: <20081201111113.13245.33023@eos.apache.org> Subject: [Couchdb Wiki] Update of "Introduction to CouchDB views" by JedediahSmith X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification. The following page has been changed by JedediahSmith: http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views The comment on the change is: add reduce examples ------------------------------------------------------------------------------ 1. When ''rereduce'' is ''false'': * ''keys'' will be an array whose elements are arrays of the form ''[key,id]'', where ''key'' is a key emitted by the map function and ''id'' is that of the document from which the key was generated. * ''values'' will be an array of the values emitted for the respective elements in ''keys'' + * i.e. {{{reduce([ [key1,id1], [key2,id2], [key3,id3] ], [value1,value2,value3], false)}}} + 2. When ''rereduce'' is ''true'': * ''keys'' will be ''null'' * ''values'' will be an array of values returned by previous calls to the reduce function + * i.e. {{{reduce(null, [intermediate1,intermediate2,intermediate3], true)}}} Reduce functions should return a single value, suitable for both the ''value'' field of the final view and as a member of the ''values'' array passed to the reduce function.