incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: Upgrading from 1.1.0 to 1.1.1 views stopped working
Date Wed, 07 Dec 2011 15:26:14 GMT
Looks like you've got a Spidermonkey that's too new for CouchJS. You
can either change that to something older or you should be able to
change your map function to something like:

function map(doc) {
    if(doc.type && doc.type == "care_target") {
        emit([doc.customer, doc.name], {name: doc.name});
    }
}

2011/12/7 Niklas Närhinen <niklas@narhinen.net>:
> Hi,
> it seems something has changed in the way how couchdb transforms the json
> strings to map etc functions.
>
> Here is what I'm getting after upgrading to 1.1.1 and querying a view (in
> futon):
>
> Error: compilation_error
>
> Expression does not eval to a function. ((new String("function(doc) {\n\tif
> (doc.type && doc.type == \"care_target\") {\n\t\temit([doc.customer,
> doc.name], {name: doc.name});\n\t}\n}")))
>
> Any ideas? (btw, both 1.1.0 and 1.1.1 are from debian unstable)
>
> Niklas

Mime
View raw message