Commit c82703d45e1259a5249a67b523dabe4bad692cdc
1 parent
433701e2
Exists in
master
and in
19 other branches
Check size for performance [skip ci]
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/searchkick/process_batch_job.rb
... | ... | @@ -15,8 +15,8 @@ module Searchkick |
15 | 15 | # bulk reindex |
16 | 16 | index = klass.searchkick_index |
17 | 17 | Searchkick.callbacks(:bulk) do |
18 | - index.bulk_index(records) | |
19 | - index.bulk_delete(delete_records) | |
18 | + index.bulk_index(records) if records.any? | |
19 | + index.bulk_delete(delete_records) if delete_records.any? | |
20 | 20 | end |
21 | 21 | end |
22 | 22 | end | ... | ... |