Change private statuses index to index without crutches (#26713)
This commit is contained in:
parent
74eb7dbf2d
commit
9e77ab7db2
5 changed files with 21 additions and 47 deletions
|
@ -14,7 +14,7 @@ class Importer::StatusesIndexImporter < Importer::BaseImporter
|
|||
scope.find_in_batches(batch_size: @batch_size) do |tmp|
|
||||
in_work_unit(tmp.map(&:status_id)) do |status_ids|
|
||||
bulk = ActiveRecord::Base.connection_pool.with_connection do
|
||||
Chewy::Index::Import::BulkBuilder.new(index, to_index: Status.includes(:media_attachments, :preloadable_poll, :preview_cards).where(id: status_ids)).bulk_body
|
||||
Chewy::Index::Import::BulkBuilder.new(index, to_index: index.adapter.default_scope.where(id: status_ids)).bulk_body
|
||||
end
|
||||
|
||||
indexed = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue