couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand Chitipothu <>
Subject Re: how to count the number of unique values
Date Sat, 16 Oct 2010 15:00:22 GMT
2010/10/13 Paul Davis <>:
>>    // 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.

It looks too complicated for my needs. I think I'm going to change my
data model to avoid this problem.

Thanks for your suggestions.


View raw message