couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadley wickham <h.wick...@gmail.com>
Subject Re: Understanding couchdb error messages
Date Tue, 25 Aug 2009 19:23:35 GMT
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<paul.joseph.davis@gmail.com> 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<h.wickham@gmail.com> 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/

Mime
View raw message