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
README.md
... ... @@ -520,12 +520,10 @@ class Product < ApplicationRecord
520 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 525 ```ruby
526 526 class Product < ApplicationRecord
527   - scope :search_import, -> { where(active: true) }
528   -
529 527 def should_index?
530 528 active # only index active records
531 529 end
... ...