Browse files

Merge pull request #147 from cloudant/28181-view-ordering

Use couch_view:less_json_ids when comparing view row ids
  • Loading branch information...
2 parents fc7b7dc + 9a42bc3 commit 92cd1bc26c77ce0dbf41683b3d0fa6b7b8efdf46 @rnewson rnewson committed Feb 18, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/fabric_view_map.erl
View
4 src/fabric_view_map.erl
@@ -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}) ->

0 comments on commit 92cd1bc

Please sign in to comment.