Hi The command below works for CouchDB 1.6.1 but not for 2.0.0. I saw it mentioned on the Cloudant website but couldn't see an explanation. Could someone give me the reason or solution please:
curl -X PUT http://user:[email protected]:5984/database/_design/abc -d'{"views":{"test":{"map":"function(doc){\n emit(doc.key,doc.value);\n}"},"reduce":"function(key,values){\n return count(values)\n;}"}, "language": "javascript"}' -H "Content-Type:application/json" reply: {"error":"invalid_design_doc","reason":"`views.reduce` field must have object type"} Many thanks. John.
