Commit fa84aa581e0696a89eeac52e4c3a0359d5e73bfd
1 parent
93f99b32
Exists in
master
and in
2 other branches
Added comment [skip ci]
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
lib/searchkick/reindex_v2_job.rb
... | ... | @@ -4,7 +4,8 @@ module Searchkick |
4 | 4 | |
5 | 5 | def perform(klass, id, method_name = nil, routing: nil) |
6 | 6 | model = klass.constantize |
7 | - # may not be needed if calling search_import later | |
7 | + # use should_index? to decide whether to index (not default scope) | |
8 | + # just like saving inline | |
8 | 9 | model = model.unscoped if model.respond_to?(:unscoped) |
9 | 10 | items = [{id: id, routing: routing}] |
10 | 11 | model.searchkick_index.send(:record_indexer).reindex_items(model, items, method_name: method_name, single: true) | ... | ... |