Use different comparison function
Our mango_json:cmp/2 function used couch_ejson_compare:less_json.
That function returned a boolean value, but we need a number.
Documents were not returned and tests were failing. Changed function
to use couch_ejson_compare:less instead.
Fixes COUCHDB-2622
diff --git a/src/mango_json.erl b/src/mango_json.erl
index 2c602b6..9584c2d 100644
--- a/src/mango_json.erl
+++ b/src/mango_json.erl
@@ -49,7 +49,7 @@
cmp(_, ?MAX_VAL) ->
-1;
cmp(A, B) ->
- couch_ejson_compare:less_json(A, B).
+ couch_ejson_compare:less(A, B).
cmp_raw(?MIN_VAL, ?MIN_VAL) ->