In Couchbase I have list of documment in format:
{
"article_id": "107485",
"domain": "thethao.langthuma.mr",
"category_alias": "langthuma-anh-the-thao",
"ip": "113.170.188.166",
"process_time": "635411909410581019",
"created_at": "635411845276059707"
}
I create a view:
Map
function (doc, meta) {
emit([doc.article_id,doc.domain],meta.id);
}
Reduce: (use built-in)
_sum
When I need a query like SQL:
Select article_id, domain, Count(*) from table group by article_id, domain
But i run and get error
{error,<<"Builtin _sum function requires map values to be numbers or lists of numbers">>}
Please show me where i did wrong? And solution for this?
And I want to do it with C#, any suggestion, thanks?