Use group_level=1
when you query.
How to I want to filter the couchDB using the mapreduce
Pergunta
I created a view.
map
function(doc) {
emit(doc.country, 1);
}
reduce(Raw view)
function(key, values) {
return sum(values);
}
result
{"rows":[
{"key":null,"value":120081}
]}
I want to get these results.(example)
{"rows":[
{"key":US,"value":2135}
{"key":CN,"value":556}
{"key":EN,"value":5414}
]}
like this....
I do not know what to do.
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow