couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Hayton <>
Subject Question About Top Tags Reduce Function
Date Mon, 24 May 2010 21:19:44 GMT
Hi Everyone-

I decided I needed a tag cloud for my application.  I thought this would be
super simple.  I decided to emit a each tag as a key with 1 as a value and
then do a simple 'sum values' to get a count of each tag.  Then I realized I
couldn't sort by values in couch so I can't effectively get a list of the
top 50 tags using this method.  So I went and asked my dear friend google
about 'top tags couchdb' because I vaguely remember reading something about
this somewhere and I came across this result:

The method described here works exactly how I want.  It doesn't throw any
reduce overflow errors.  My question is, does anyone have any clue whether
or not this is a sustainable and reasonable performant reduce function.
 Will it hold up with hundreds of thousands of tags?  Any obvious problems
with doing something like this?  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.  I obviously plan on testing this out, but if anyone
could take a look at what this guy is doing and give me some feedback, I
would be very grateful.  Also, any other suggestions would be appreciated.


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