diff options
author | Adam Kocoloski <adam@cloudant.com> | 2011-05-02 22:25:34 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2011-05-19 10:42:46 -0400 |
commit | 5e7ad32e1b1dee38aa37d7831b30ee8e54009016 (patch) | |
tree | c40d533d0d64350a348ecc66ba18bfec37521039 /apps/couch/src/couch_view.erl | |
parent | 2ba9419cc659bf4cb633f66a76f9789fb7a526fe (diff) |
Fix under-reported values in reduce views
Thanks Hardtke for ruining my afternoon^H^H^H^H demonstrating the bug.
BugzID: 12112
Diffstat (limited to 'apps/couch/src/couch_view.erl')
-rw-r--r-- | apps/couch/src/couch_view.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/couch/src/couch_view.erl b/apps/couch/src/couch_view.erl index 65a42c0b..6093d69d 100644 --- a/apps/couch/src/couch_view.erl +++ b/apps/couch/src/couch_view.erl @@ -173,7 +173,7 @@ fold_reduce({reduce, NthRed, Lang, #view{btree=Bt, reduce_funs=RedFuns}}, Fun, A {ok, Reduced} = couch_query_servers:reduce(Lang, [FunSrc], detuple_kvs(expand_dups(KVs, []),[])), {0, PreResultPadding ++ Reduced ++ PostResultPadding}; (rereduce, Reds) -> - UserReds = [[lists:nth(NthRed, UserRedsList)] || {_, UserRedsList} <- Reds], + UserReds = [[lists:nth(NthRed, element(2, R))] || R <- Reds], {ok, Reduced} = couch_query_servers:rereduce(Lang, [FunSrc], UserReds), {0, PreResultPadding ++ Reduced ++ PostResultPadding} end, |