On Jan 17, 2012, at 8:31 PM, James Marca wrote: > Hi, > > this is a quick note for whomever is in charge of the wiki (my wiki > account no longer has write ability) > > Built-In_Reduce_Functions says that you need to emit numbers for the > _sum operation. As of 1.2.x, this can also be a list of numbers. > > I just emitted a list of numbers and got what I expected...that is, a > sum over each element of the list (not a summing up of the elements, > summed. > > Example: > > no reducing, I emit a list of 4 items for each key: > > ["2007-02-27", "1213122", "2007-02-27 14:46:00 UTC"] > [0.000007830687904038072, 0.000001032961291729275,0.0000012756780418961, > 2.209310910297831e-7] > ["2007-02-27", "1213122", "2007-02-27 14:46:30 UTC"] > [0.000008151766266816958, 0.000001042421330553939,0.000001315925015500657, > 2.278253064474915e-7] > > "Exact" reducing, same as emit with no reduce: > > ["2007-02-27", "1213122", "2007-02-27 14:46:00 UTC"] > [0.000007830687904038072, 0.000001032961291729275,0.0000012756780418961, > 2.209310910297831e-7] > ["2007-02-27", "1213122", "2007-02-27 14:46:30 UTC"] > [0.000008151766266816958, 0.000001042421330553939,0.000001315925015500657, > 2.278253064474915e-7] > > level=1 reducing, summing up over each day > > ["2007-02-27"] [0.003547119931415267, 0.005496433891250249, > 0.007064010452051014,0.003552803842322634] > ["2007-02-28"] [0.008437247339553495, 0.01664606221946668, > 0.01779585111017863,0.01036210620457586] > > > I observed this behavior in 1.2.x. I know this hasn't always been a > feature, but I couldn't find whether it was 1.1 or 1.0, or what. > > Regards, > James Marca
I believe it arrived in 1.1.0: https://github.com/apache/couchdb/blob/1.1.0/CHANGES#L47 As far as the wiki goes, we needed to lock it down to deal with spam edits. Happy to add you to http://wiki.apache.org/couchdb/ContributorsGroup -- are you JamesMarca on MoinMoin? Adam
