Repository: couchdb-mango
Updated Branches:
  refs/heads/master 1a4215678 -> 610ccb60d


Set default limit to 25

The docs claim the limit is 25 and this was the intention but this value
was never updated. The reason to set it at 25 is in case we add other
index types that are unable to stream results to the client (ie,
anything Lucene based). This allows us to maintain the same API across
all calls regardless of index type used.

COUCHDB-3143


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mango/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mango/commit/d8432c58
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mango/tree/d8432c58
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mango/diff/d8432c58

Branch: refs/heads/master
Commit: d8432c58a004141123e13a5af6dad78e3746399d
Parents: 1a42156
Author: Paul J. Davis <paul.joseph.da...@gmail.com>
Authored: Sun Sep 11 13:38:12 2016 -0500
Committer: Paul J. Davis <paul.joseph.da...@gmail.com>
Committed: Sun Sep 11 14:07:50 2016 -0500

----------------------------------------------------------------------
 src/mango_cursor.hrl | 2 +-
 src/mango_opts.erl   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/d8432c58/src/mango_cursor.hrl
----------------------------------------------------------------------
diff --git a/src/mango_cursor.hrl b/src/mango_cursor.hrl
index f80c987..5706b6b 100644
--- a/src/mango_cursor.hrl
+++ b/src/mango_cursor.hrl
@@ -16,7 +16,7 @@
     ranges,
     selector,
     opts,
-    limit = 10000000000,
+    limit = 25,
     skip = 0,
     fields = undefined,
     user_fun,

http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/d8432c58/src/mango_opts.erl
----------------------------------------------------------------------
diff --git a/src/mango_opts.erl b/src/mango_opts.erl
index 0c66a21..40e3504 100644
--- a/src/mango_opts.erl
+++ b/src/mango_opts.erl
@@ -93,7 +93,7 @@ validate_find({Props}) ->
         {<<"limit">>, [
             {tag, limit},
             {optional, true},
-            {default, 10000000000},
+            {default, 25},
             {validator, fun is_non_neg_integer/1}
         ]},
         {<<"skip">>, [

Reply via email to