couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <>
Subject Re: how to count the number of unique values
Date Tue, 12 Oct 2010 19:47:09 GMT
>    // This assumes keys is sorted (which I think is safe), but if not
> you can always sort them yourself

This algorithm is what I was thinking of. Its basically the top N tags
example but just counting uniques. There is a gotcha in that you need
to sort the keys yourself because of a weird reduce thing I never
tracked down completely. IIRC, it was something about how the final
reduce runs that requires this.

Otherwise, what Randall said.

View raw message