diff --git a/CHANGELOG.md b/CHANGELOG.md index d0b2e59..2a5759f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - The `_all` field is disabled by default in Elasticsearch 5. Use `searchkick _all: true` if you need it. - An `ArgumentError` is raised instead of a warning when options are incompatible with the `body` option - Removed `log` option from `boost_by`. Use `modifier: "ln2p"` instead. +- Removed `unscoped_reindex_job` option (always `true` now) ## 2.5.1 [unreleased] diff --git a/lib/searchkick/model.rb b/lib/searchkick/model.rb index 7190076..0060799 100644 --- a/lib/searchkick/model.rb +++ b/lib/searchkick/model.rb @@ -5,7 +5,7 @@ module Searchkick :filterable, :geo_shape, :highlight, :ignore_above, :index_name, :index_prefix, :inheritance, :language, :locations, :mappings, :match, :merge_mappings, :routing, :searchable, :settings, :similarity, :special_characters, :stem_conversions, :suggest, :synonyms, :text_end, - :text_middle, :text_start, :unscoped_reindex_job, :word, :wordnet, :word_end, :word_middle, :word_start] + :text_middle, :text_start, :word, :wordnet, :word_end, :word_middle, :word_start] raise ArgumentError, "unknown keywords: #{unknown_keywords.join(", ")}" if unknown_keywords.any? raise "Only call searchkick once per model" if respond_to?(:searchkick_index) diff --git a/lib/searchkick/reindex_v2_job.rb b/lib/searchkick/reindex_v2_job.rb index 90c0161..38cfc92 100644 --- a/lib/searchkick/reindex_v2_job.rb +++ b/lib/searchkick/reindex_v2_job.rb @@ -13,11 +13,7 @@ module Searchkick model = klass.constantize record = begin - if model.searchkick_options[:unscoped_reindex_job] - model.unscoped.find(id) - else - model.find(id) - end + model.unscoped.find(id) rescue => e # check by name rather than rescue directly so we don't need # to determine which classes are defined -- libgit2 0.21.0