With the map/reduce function I wrote, this query;

http://127.0.0.1:5984/foo/_design/foo/_view/bar?group=true&startkey=[%22contacts%22,%20%222012-10-01%22]&endkey=[%22contacts%22,%222012-10-01%22,{}]

gives this result;

{"rows":[
{"key":["contacts","2012-10-01","browser"],"value":2},
{"key":["contacts","2012-10-01","date"],"value":2},
{"key":["contacts","2012-10-01","ip"],"value":2},
{"key":["contacts","2012-10-01","page"],"value":2}
]}

which is the count of each item, it's just tall instead of wide.

B.

On 15 January 2012 18:49, Gabriel de Oliveira Barbosa
<[email protected]> wrote:
> I was thinking about what you propose and using this I guess that will have
> to make many requests to get all data.
> To understand my problem I created a gist, showing what I have and what
> want.
> Can anyone help me with with "what I need to write" ?
> https://gist.github.com/59f413cab266b107a4e5
>
>
> Thanks guys.
> Sorry for my english, I'm from Brazil and in love with couchdb (even
> impossible to write a simple map-reduce).

Reply via email to