diff options
Diffstat (limited to 'src/couchdb/couch_btree.erl')
-rw-r--r-- | src/couchdb/couch_btree.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/couchdb/couch_btree.erl b/src/couchdb/couch_btree.erl index f01234c1..b9374f91 100644 --- a/src/couchdb/couch_btree.erl +++ b/src/couchdb/couch_btree.erl @@ -64,7 +64,7 @@ final_reduce(Reduce, {[], []}) -> final_reduce(_Bt, {[], [Red]}) -> Red; final_reduce(Reduce, {[], Reductions}) -> - Reduce(combine, Reductions); + Reduce(rereduce, Reductions); final_reduce(Reduce, {KVs, Reductions}) -> Red = Reduce(reduce, KVs), final_reduce(Reduce, {[], [Red | Reductions]}). @@ -289,7 +289,7 @@ modify_node(Bt, RootPointerInfo, Actions, QueryOutput) -> reduce_node(#btree{reduce=nil}, _NodeType, _NodeList) -> []; reduce_node(#btree{reduce=R}, kp_node, NodeList) -> - R(combine, [Red || {_K, {_P, Red}} <- NodeList]); + R(rereduce, [Red || {_K, {_P, Red}} <- NodeList]); reduce_node(#btree{reduce=R}, kv_node, NodeList) -> R(reduce, NodeList). @@ -658,7 +658,7 @@ test_btree(KeyValues) -> ReduceFun = fun(reduce, KVs) -> length(KVs); - (combine, Reds) -> + (rereduce, Reds) -> lists:sum(Reds) end, Btree1 = set_options(Btree, [{reduce, ReduceFun}]), |