Try replacing data:

         --data '{"map" : "function(doc) { emit(null, doc); }"}'


On Jul 8, 2008, at 7:17 AM, Paul Oliver wrote:

Hi all,

I'm trying to get a simple view going.  Can anybody tell me what I'm
doing wrong here?  I'm using Apache CouchDB 0.8.0-incubating.

altais:~$ curl  -H 'Content-Type:application/json' --data
'function(doc) { emit(null, doc); }'
http://localhost:5984/mydb/_temp_view

returns:

{"error":"EXIT","reason":"{function_clause,[{cjson,tokenize,\n
               [\"function(doc) { emit(null, doc); }\",\n
            {decoder,unicode,null,1,1,any}]},\n
{cjson,decode1,2},\n                  {cjson,json_decode,2},\n
        {couch_httpd,handle_db_request,3},\n
{couch_httpd,handle_request,2},\n
{mochiweb_http,headers,4},\n                  {proc_lib,init_p,5}]}"}

Thanks in advance,
Paul.

Reply via email to