Skip to content
This repository has been archived by the owner on Sep 19, 2019. It is now read-only.

Use couch_view:less_json_ids when comparing view row ids #147

Merged
merged 1 commit into from Feb 18, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/fabric_view_map.erl
Expand Up @@ -141,11 +141,11 @@ handle_message(complete, Worker, State) ->

merge_row(fwd, undefined, Row, Rows) ->
lists:merge(fun(#view_row{key=KeyA, id=IdA}, #view_row{key=KeyB, id=IdB}) ->
couch_view:less_json([KeyA, IdA], [KeyB, IdB])
couch_view:less_json_ids({KeyA, IdA}, {KeyB, IdB})
end, [Row], Rows);
merge_row(rev, undefined, Row, Rows) ->
lists:merge(fun(#view_row{key=KeyA, id=IdA}, #view_row{key=KeyB, id=IdB}) ->
couch_view:less_json([KeyB, IdB], [KeyA, IdA])
couch_view:less_json_ids({KeyB, IdB}, {KeyA, IdA})
end, [Row], Rows);
merge_row(_, KeyDict, Row, Rows) ->
lists:merge(fun(#view_row{key=A, id=IdA}, #view_row{key=B, id=IdB}) ->
Expand Down