incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CGS <>
Subject [CouchDB Wiki] list functions misleading info
Date Mon, 16 Jan 2012 14:54:32 GMT
Hi everyone,

I know there is outdated info in CouchDB Wiki and, therefore, for the
beginners like me here is a piece of misleading info and how its solution.
Maybe someone is interested.

I was playing with the list functions and I noticed that on the page

the view functions are constructed without map key (perhaps being
considered as the only functions, so, omitting that key). If one tries
those examples, he/she will get the "function_clause" error (in lists:foldl
from couch_view_group). Instead, those view functions should be written as:

"views" {
        "posts-by-date": {"map": "function(doc){ /*...*/ }"},
        "posts-by-tag": {"map": "function(doc){ /*...*/ }"},
        "people-by-name": {"map": "function(doc) { /*...*/ }"}

My CouchDB version is 1.1.0 (so, perhaps the later versions will report the
same problem).


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message