incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarrod Roberson <jar...@vertigrated.com>
Subject Re: Question About Top Tags Reduce Function
Date Tue, 25 May 2010 20:17:51 GMT
On Mon, May 24, 2010 at 5:19 PM, James Hayton <theboss@purplebulldog.com>wrote:

> Hi Everyone-
>
> ... CouchDB is pretty simple imho for the most
> part, but I haven't always been able to grasp the reduce functions and what
> I can and can't do.  ...
>

the gist of what a reduce function should and should not do is simple.
It should reduce a set of data down to a much smaller set of data.
In your case, thousands of tags down to a single entry with a total.
then in the rereduce part it might reduce those intermediate results even
more.
So that many values or keys get reduced down to a very small percentage of
the original set.
And the high water mark filter also catches when you reduce down to 1 value
that is really big, as it checks the byte size of the reduced value. That is
why you can't take a thousand entries from values and reduce them to a
single value with all thousand things appended together, it will complain
about that.

-- 
Jarrod Roberson
www.vertigrated.com/blog

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message