Commit 9a9bc336782b97231f334862568662b3d1e07b61
1 parent
122d6b85
Exists in
master
and in
19 other branches
Fixed notifications for records missing ids
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
lib/searchkick/index.rb
... | ... | @@ -76,7 +76,7 @@ module Searchkick |
76 | 76 | end |
77 | 77 | |
78 | 78 | def bulk_delete(records) |
79 | - Searchkick.indexer.queue(records.reject { |r| r.id.blank? }.map { |r| {delete: record_data(r)} }) | |
79 | + bulk_delete_helper(records.reject { |r| r.id.blank? }) | |
80 | 80 | end |
81 | 81 | |
82 | 82 | def bulk_index(records) |
... | ... | @@ -475,6 +475,10 @@ module Searchkick |
475 | 475 | end |
476 | 476 | end |
477 | 477 | |
478 | + def bulk_delete_helper(records) | |
479 | + Searchkick.indexer.queue(records.map { |r| {delete: record_data(r)} }) | |
480 | + end | |
481 | + | |
478 | 482 | def redis |
479 | 483 | Searchkick.redis |
480 | 484 | end | ... | ... |
lib/searchkick/logging.rb