Commit 610937f8c16f504e96418adedf192b0c98a09ce9

Authored by Andrew Kane
1 parent 6e6e9213

Improved performance of async full reindex - fixes #1325

Showing 2 changed files with 6 additions and 0 deletions   Show diff stats
CHANGELOG.md
  1 +## 4.1.1 [unreleased]
  2 +
  3 +- Improved performance of async full reindex
  4 +
1 5 ## 4.1.0
2 6  
3 7 - Added `like` operator
... ...
lib/searchkick/bulk_indexer.rb
... ... @@ -87,6 +87,8 @@ module Searchkick
87 87 # TODO expire Redis key
88 88 primary_key = scope.primary_key
89 89  
  90 + scope = scope.select(primary_key).except(:includes, :preload)
  91 +
90 92 starting_id =
91 93 begin
92 94 scope.minimum(primary_key)
... ...