Commit b888bfe2b9d41daa9cb6eceb35c1db40ce110d1e

Authored by Andrew
1 parent bbc1b8fd

Renamed to unscoped_reindex_job [skip ci]

CHANGELOG.md
  1 +## 2.5.1 [unreleased]
  2 +
  3 +- Added `unscoped_reindex_job` option
  4 +
1 5 ## 2.5.0
2 6  
3 7 - Try requests 3 times before raising error
... ...
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, :word, :wordnet, :word_end, :word_middle, :word_start]
  8 + :text_middle, :text_start, :unscoped_reindex_job, :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,7 +13,7 @@ module Searchkick
13 13 model = klass.constantize
14 14 record =
15 15 begin
16   - if model.searchkick_options[:unscoped_reindex]
  16 + if model.searchkick_options[:unscoped_reindex_job]
17 17 model.unscoped.find(id)
18 18 else
19 19 model.find(id)
... ...