For some reason I'm only getting a null key from map/reduce result in couchdb on mac
Result:
{"rows":[
{"key":null,"value":2224}
]}
Im using couchapp v8.1 and couchdb v1.0.2
My map function is:
function(doc) {
emit(doc.doc_type, 1);
}
My reduce function is:
function(key, values, rereducer) {
return sum(values);
}
result I was expecting:
{"rows":[
{"key":"type1","value":22}
{"key":"type2","value":32}
{"key":"type3","value":25}
//snip snip
]}
Any idea where I went wrong?
?reduce=false
even if I don't have a reduce function, just to be sure. – Twigg