Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 12944 invoked from network); 26 Aug 2009 05:36:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Aug 2009 05:36:13 -0000 Received: (qmail 94172 invoked by uid 500); 26 Aug 2009 05:36:12 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 94095 invoked by uid 500); 26 Aug 2009 05:36:12 -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 94085 invoked by uid 99); 26 Aug 2009 05:36:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 05:36:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nborwankar@gmail.com designates 209.85.216.180 as permitted sender) Received: from [209.85.216.180] (HELO mail-px0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 05:36:00 +0000 Received: by pxi10 with SMTP id 10so6703984pxi.28 for ; Tue, 25 Aug 2009 22:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=I8SJE7rYOj6kLC7prkKFgNrwokgYS+FqZnQ8QWmb2JA=; b=Vb/8MDr6YADdhicHWnmZhbiVZSB5Q9CcCufqT6/iZ+s77jGGjC5LL04ogrMeqs1aCy H7KLXb/MKXgUsnM+kooR3gvZ2PYlSEWiPUYz39Dp4ROHMNEVKmMJI2REWvJL1oyH2K3F XM8yIc3sGaSkWhMx+d9KvOv7WCmaOVCYXzr20= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=QytI483Duuj9y3wFOm+MQJVAflRegHevRq+07Tp3s+lDPsDndTPGitN6WKV5nXFgq5 n9hxwfcgCgaslD0t7a3356RLvRIi3K0ek7kmrtEaJ9q7hPe2ynMY9uLpzEYoUzZB37YD 7REULR8lzBJF/n8vQW7PDpr40z1icdOjYuIb8= MIME-Version: 1.0 Sender: nborwankar@gmail.com Received: by 10.141.37.19 with SMTP id p19mr3321610rvj.29.1251264939265; Tue, 25 Aug 2009 22:35:39 -0700 (PDT) In-Reply-To: References: Date: Tue, 25 Aug 2009 22:35:39 -0700 X-Google-Sender-Auth: 07582bb535e0e19d Message-ID: <921000908252235l6189dd97w9cb6e66b106d4bc9@mail.gmail.com> Subject: Re: Understanding couchdb error messages From: Nitin Borwankar To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=000e0cd1d20a3991e0047204d26a X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd1d20a3991e0047204d26a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hadley, Also you need semicolons at line ends - your Ruby is showing ( :-) ). For small one-liners this may not bite you but in general safer to add ";". Nitin 37% of all statistics are made up on the spot ------------------------------------------------------------------------------------- Nitin Borwankar nborwankar@gmail.com On Tue, Aug 25, 2009 at 12:23 PM, hadley wickham wrote: > Oh thanks! I've been programming too much in languages with implicit > returns. > > Hadley > > On Tue, Aug 25, 2009 at 2:21 PM, Paul Davis > wrote: > > Doh! > > > > Missed it the first time through. You need "return sum(values);" No > > return means it returns undefined. > > > > HTH, > > Paul Davis > > > > On Tue, Aug 25, 2009 at 3:18 PM, hadley wickham > wrote: > >>> The important bit: > >>> > >>> <<"Cannot encode 'undefined' value as JSON">> > >>> > >>> Means we're missing something in the view server, but the underlying > >>> cause is that you're accessing a JavaScript member that doesn't exist. > >>> Something like: > >>> > >>> var f = {"stuff": "here"}; > >>> emit(f.not_an_member, null); > >>> > >>> Both of your maps look all right though. Is that all there is, or is > >>> there something else that wasn't pasted? > >> > >> That's all there is. The documents all look something like this: > >> > >> {"issue": 2, "type": "article", "keywords": ["distribution theory"], > >> "pages": [135, 143], "id_entity": 1000022934, "year": 1922, "journal": > >> "Transactions of the American Mathematical Society", "authors": > >> ["Coolidge, J. L."], "title": "The Gaussian law of error for any > >> number of variables", "volume": 24, "id_title": 260229} > >> > >> Hadley > >> > >> > >> > >> -- > >> http://had.co.nz/ > >> > > > > > > -- > http://had.co.nz/ > --000e0cd1d20a3991e0047204d26a--