|
@@ -182,9 +182,12 @@ reload search index with full data
|
|
|
query = reorder(created_at: :desc)
|
|
|
total = query.count
|
|
|
record_count = 0
|
|
|
+ offset = 0
|
|
|
batch_size = 200
|
|
|
|
|
|
- query.in_batches(of: batch_size) do |records|
|
|
|
+ while query.offset(offset).limit(batch_size).count.positive?
|
|
|
+ records = query.offset(offset).limit(batch_size)
|
|
|
+
|
|
|
Parallel.map(records, { in_processes: worker }) do |record|
|
|
|
next if record.ignore_search_indexing?(:destroy)
|
|
|
|
|
@@ -198,6 +201,8 @@ reload search index with full data
|
|
|
end
|
|
|
end
|
|
|
|
|
|
+ offset += batch_size
|
|
|
+
|
|
|
next if silent
|
|
|
|
|
|
record_count += records.count
|