Commit 40698f3d7987768d0989a2b9e98469d20cd519c9
1 parent
fdc799d6
Exists in
master
and in
19 other branches
Removed unscoped_reindex_job option
Showing
3 changed files
with
3 additions
and
6 deletions
Show diff stats
CHANGELOG.md
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | - The `_all` field is disabled by default in Elasticsearch 5. Use `searchkick _all: true` if you need it. |
9 | 9 | - An `ArgumentError` is raised instead of a warning when options are incompatible with the `body` option |
10 | 10 | - Removed `log` option from `boost_by`. Use `modifier: "ln2p"` instead. |
11 | +- Removed `unscoped_reindex_job` option (always `true` now) | |
11 | 12 | |
12 | 13 | ## 2.5.1 [unreleased] |
13 | 14 | ... | ... |
lib/searchkick/model.rb
... | ... | @@ -5,7 +5,7 @@ module Searchkick |
5 | 5 | :filterable, :geo_shape, :highlight, :ignore_above, :index_name, :index_prefix, :inheritance, :language, |
6 | 6 | :locations, :mappings, :match, :merge_mappings, :routing, :searchable, :settings, :similarity, |
7 | 7 | :special_characters, :stem_conversions, :suggest, :synonyms, :text_end, |
8 | - :text_middle, :text_start, :unscoped_reindex_job, :word, :wordnet, :word_end, :word_middle, :word_start] | |
8 | + :text_middle, :text_start, :word, :wordnet, :word_end, :word_middle, :word_start] | |
9 | 9 | raise ArgumentError, "unknown keywords: #{unknown_keywords.join(", ")}" if unknown_keywords.any? |
10 | 10 | |
11 | 11 | raise "Only call searchkick once per model" if respond_to?(:searchkick_index) | ... | ... |
lib/searchkick/reindex_v2_job.rb
... | ... | @@ -13,11 +13,7 @@ module Searchkick |
13 | 13 | model = klass.constantize |
14 | 14 | record = |
15 | 15 | begin |
16 | - if model.searchkick_options[:unscoped_reindex_job] | |
17 | - model.unscoped.find(id) | |
18 | - else | |
19 | - model.find(id) | |
20 | - end | |
16 | + model.unscoped.find(id) | |
21 | 17 | rescue => e |
22 | 18 | # check by name rather than rescue directly so we don't need |
23 | 19 | # to determine which classes are defined | ... | ... |