|
|
@ -6,8 +6,8 @@ class Importer::AccountsIndexImporter < Importer::BaseImporter
|
|
|
|
in_work_unit(tmp) do |accounts|
|
|
|
|
in_work_unit(tmp) do |accounts|
|
|
|
|
bulk = Chewy::Index::Import::BulkBuilder.new(index, to_index: accounts).bulk_body
|
|
|
|
bulk = Chewy::Index::Import::BulkBuilder.new(index, to_index: accounts).bulk_body
|
|
|
|
|
|
|
|
|
|
|
|
indexed = bulk.select { |entry| entry[:index] }.size
|
|
|
|
indexed = bulk.count { |entry| entry[:index] }
|
|
|
|
deleted = bulk.select { |entry| entry[:delete] }.size
|
|
|
|
deleted = bulk.count { |entry| entry[:delete] }
|
|
|
|
|
|
|
|
|
|
|
|
Chewy::Index::Import::BulkRequest.new(index).perform(bulk)
|
|
|
|
Chewy::Index::Import::BulkRequest.new(index).perform(bulk)
|
|
|
|
|
|
|
|
|
|
|
|