2009/6/10 Chris Anderson <[email protected]>: > On Wed, Jun 10, 2009 at 6:06 AM, Benoit Chesneau<[email protected]> 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
