summaryrefslogtreecommitdiff
path: root/src/couch_views/src/couch_views_util.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/couch_views/src/couch_views_util.erl')
-rw-r--r--src/couch_views/src/couch_views_util.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/couch_views/src/couch_views_util.erl b/src/couch_views/src/couch_views_util.erl
index 70400203c..da0f09a1f 100644
--- a/src/couch_views/src/couch_views_util.erl
+++ b/src/couch_views/src/couch_views_util.erl
@@ -26,6 +26,7 @@
-include_lib("couch/include/couch_db.hrl").
-include_lib("couch_mrview/include/couch_mrview.hrl").
-include("couch_views.hrl").
+-include_lib("mango/src/mango_idx_view.hrl").
ddoc_to_mrst(DbName, #doc{id=Id, body={Fields}}) ->
@@ -99,6 +100,9 @@ collate_raw(A, B) when A < B -> lt;
collate_raw(A, B) when A > B -> gt.
+collate_rows(_, {[?MAX_JSON_OBJ], _}) ->
+ lt;
+
collate_rows({KeyA, DocIdA}, {KeyB, DocIdB}) ->
case couch_ejson_compare:less(KeyA, KeyB) of
N when N < 0 -> lt;