Commit d6abba8d2e3fe4e11b9fedd8865491634316d48b

Authored by Andrew Kane
1 parent b17c8d03

Do not recommend updating search_import for should_index? - works fine for full …

…reindex, but interferes with relation reindexing and queue mode (causes records to not be removed if should_index? changes from true to false) [skip ci]
Showing 1 changed file with 1 additions and 3 deletions   Show diff stats
@@ -520,12 +520,10 @@ class Product < ApplicationRecord @@ -520,12 +520,10 @@ class Product < ApplicationRecord
520 end 520 end
521 ``` 521 ```
522 522
523 -By default, all records are indexed. To control which records are indexed, use the `should_index?` method together with the `search_import` scope. 523 +By default, all records are indexed. To control which records are indexed, use the `should_index?` method.
524 524
525 ```ruby 525 ```ruby
526 class Product < ApplicationRecord 526 class Product < ApplicationRecord
527 - scope :search_import, -> { where(active: true) }  
528 -  
529 def should_index? 527 def should_index?
530 active # only index active records 528 active # only index active records
531 end 529 end