Commit 0dffd602561bdbe13631b5c3c840aeace681f4f0
1 parent
faab37f9
Exists in
master
and in
19 other branches
Bumped default limit to 10,000 (close as we can get to no limit without changing…
… index settings) [skip ci]
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
CHANGELOG.md
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | - Removed support for ActiveRecord < 4.2 and Mongoid < 5 |
5 | 5 | - Removed `reindex_async` method. `reindex` now defaults to mode specified by model. Use `reindex(mode: :async)` to force async reindex. |
6 | 6 | - Types are no longer supported. To upgrade models that use inheritance, upgrade your gem to `2.5.0`. Added `inheritance: true` to your `searchkick` method, and do a full reindex before upgrading. |
7 | +- Bumped default `limit` to 10,000 | |
7 | 8 | |
8 | 9 | ## 2.5.1 [unreleased] |
9 | 10 | ... | ... |
lib/searchkick/query.rb
... | ... | @@ -212,7 +212,7 @@ module Searchkick |
212 | 212 | |
213 | 213 | # pagination |
214 | 214 | page = [options[:page].to_i, 1].max |
215 | - per_page = (options[:limit] || options[:per_page] || 1_000).to_i | |
215 | + per_page = (options[:limit] || options[:per_page] || 10_000).to_i | |
216 | 216 | padding = [options[:padding].to_i, 0].max |
217 | 217 | offset = options[:offset] || (page - 1) * per_page + padding |
218 | 218 | ... | ... |