Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 13108 invoked from network); 21 Dec 2008 04:36:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Dec 2008 04:36:49 -0000 Received: (qmail 47709 invoked by uid 500); 21 Dec 2008 04:36:48 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 47664 invoked by uid 500); 21 Dec 2008 04:36:48 -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 47653 invoked by uid 99); 21 Dec 2008 04:36:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Dec 2008 20:36:48 -0800 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=HTML_FONT_FACE_BAD,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of webjogger@gmail.com designates 209.85.198.234 as permitted sender) Received: from [209.85.198.234] (HELO rv-out-0506.google.com) (209.85.198.234) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Dec 2008 04:36:40 +0000 Received: by rv-out-0506.google.com with SMTP id g37so1517717rvb.35 for ; Sat, 20 Dec 2008 20:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=K+I6u7MInouH6HekwBz6gQsLxp/vxj0NV496D+3FqSM=; b=ODZymMAg5f3YWXdBck1P0VCS5n2h8OdkKMqgM2tQLkDhAbgZz8KgX+E1DVaq8HF/XC 1+b7ifkaFqQ9d3WRFsIhicSIfrGe1BbqycqCayn398tQNFztlfNckH+A1iduV3U64FJy xGaJCMlEvK3Y2mn6KD+gJxwTOpkKEda+jIddw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=nqZ4s7bqzfgMa+WswgWrLaAlFs6dFf/g4L91oxRh9JEKsjJ1pZfxDeOyIKH4cuVV/f sKCuiw81xBVhdEt9NMPCcHyWNWNzQ40WPnISqV4Wl+l0Xyzb8JXlli4YsbHxR0DJYH93 PW8NuqZ/MPcnFEU178C5rgOUQW+IEX7H18y28= Received: by 10.141.137.6 with SMTP id p6mr2476153rvn.133.1229834179052; Sat, 20 Dec 2008 20:36:19 -0800 (PST) Received: by 10.141.153.4 with HTTP; Sat, 20 Dec 2008 20:36:18 -0800 (PST) Message-ID: <4c69d7170812202036o31f26074u9b8ebbc82b96bda4@mail.gmail.com> Date: Sat, 20 Dec 2008 20:36:19 -0800 From: "paul jobs" To: "Antony Blakey" , user@couchdb.apache.org Subject: Re: what does map do? In-Reply-To: <496D336A-6559-4C21-811A-6F70C127F8C0@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_53812_8386546.1229834179036" References: <4c69d7170812202022s142cee63p8dbbb497f842db00@mail.gmail.com> <496D336A-6559-4C21-811A-6F70C127F8C0@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_53812_8386546.1229834179036 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline thanks antony, couchdb is the best thing that happened to our company in the last one year :)so map is same as emit let me try it, but the map doesnt work as emit does emit works to display the documents or rows *map* function(doc) { if (doc.appname=="animgifts") emit(doc.name, doc.count); } *reduce*: function(keys, values) { return sum(values)} this outputs properly but when i try *map* function(doc) { if (doc.appname=="animgifts") map(doc.name, doc.count); } it doesnt output anything with or without reduce function paul yes i modified the view so it applies to my *doc* FieldValue*_id*"099ff2a6e345edb5dc36f75ef4109630"*_rev*"3534206171"*appname* "animgifts"*count*16*created*"2008-12-20T16:16:07Z"*date*"2008-12-20"* invuids*061545877211050731162279953484035363138484136275459055749842496 127966973277623780418533679440980423221910647883230115733898431257413435313 11891259851459031319915798959811*name*"Animgifts send"*uid*1235401894On Sat, Dec 20, 2008 at 8:30 PM, Antony Blakey wrote: > > On 21/12/2008, at 2:52 PM, paul jobs wrote: > > 1. function(doc) { >> 2. if (doc.doctype == "WikiPage") { >> 3. map([doc.title, doc.revision], doc); >> 4. } >> 5. } >> * >> * >> *this doesnt output any rows, is there any purpose as to this view* >> * >> * >> *reference: http://prematureoptimization.org/blog/archives/59* >> > > > > map(...) => emit(...) > > Antony Blakey > ------------- > CTO, Linkuistics Pty Ltd > Ph: 0438 840 787 > > The difference between ordinary and extraordinary is that little extra. > > > ------=_Part_53812_8386546.1229834179036--