couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: calulate doc popularity with couchdb map/reduce
Date Wed, 10 Jun 2009 16:24:51 GMT
2009/6/10 Chris Anderson <jchris@apache.org>:
> On Wed, Jun 10, 2009 at 6:06 AM, Benoit Chesneau<bchesneau@gmail.com> wrote:
>
> It looks like you are building up a hash of scores in your reduce. Can
> you get the same results by keeping the reduce ignorant of keys, and
> just calculating the score for whatever keys are in the range. Then
> you can use a group query and sort by value on the client.
>
> Anything involving relative popularity of certain items will have a
> sorting phase outside of CouchDB's first pass of map reduce.
>

hi, thanks for the feedback. I think you mean somethink like this :
http://www.friendpaste.com/4cIo2tzKA3epiwLkwPsolA

It works yes,  but now I need a second phase to invert values/keys and
get them in right order. In fact having the possibility to save resukt
of first reduce in temporary docs and mapping them to a new result
could be a solution.

- benoƮt

Mime
View raw message