incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand Chitipothu <anandol...@gmail.com>
Subject Re: how to count the number of unique values
Date Sat, 16 Oct 2010 15:04:42 GMT
2010/10/15 Wout Mertens <wout.mertens@gmail.com>:
> Just wanted to add that if you have a map function that emits (tag, 1) for each tag and
then a reduce function that's just _count, you will have everything you need for painting
a tag cloud.
>
> The view with group=true will list all tags exactly once, with their count. CouchDB doesn't
tell you how many rows are in the result so you'll have to count them yourself.
>
> So you load that entire view in memory and you can draw the tags with their relative
sizes.
>
> Wout.

The example I gave is a rather simplified example. I'm working a data
containing 25M+ docs with books, works and subjects. I need to find
the list/count of works for each subject. I don't think it is
practical to load the view into memory to compute the required result.

Anand

Mime
View raw message