diff options
-rw-r--r-- | src/couch_views/src/couch_views_util.erl | 4 | ||||
-rw-r--r-- | src/mango/test/17-multi-type-value-test.py | 2 |
2 files changed, 5 insertions, 1 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; diff --git a/src/mango/test/17-multi-type-value-test.py b/src/mango/test/17-multi-type-value-test.py index 194757095..fcfcd2a35 100644 --- a/src/mango/test/17-multi-type-value-test.py +++ b/src/mango/test/17-multi-type-value-test.py @@ -44,7 +44,7 @@ class MultiValueFieldTests: def test_can_query_with_age_and_name_range(self): docs = self.db.find({"age": {"$gte": 0, "$lt": 40}, "name": {"$gte": 0}}) - # expect to include "Jimi", 1 and {"forename":"Eddie"} + # expect to include "Jimi" and {"forename":"Eddie"} self.assertEqual(len(docs), 2) for d in docs: self.assertIn("name", d) |