config/initializers/searchkick.rb
# monkey-patch full_reindex_async because of bad primary key assumptions
monkey-patch full_reindex_async because of bad primary key assumptions
monkey - patch full_reindex_async because of bad primary key assumptions
def full_reindex_async(scope)
      batch_id = 1
      scope = scope.only(:_id) if scope.respond_to?(:only)
      each_batch(scope) do |items|
        bulk_reindex_job scope, batch_id, record_ids: items.map { |i| i.id.to_s }
        batch_id += 1
      end
    end
def full_reindex_async ( scope ) batch_id = 1 scope = scope . only ( :_id ) if scope . respond_to? ( :only ) each_batch ( scope ) do | items | bulk_reindex_job scope , batch_id , record_ids : items . map { | i | i . id . to_s } batch_id += 1 end end
monkey-patch full_reindex_async because of bad primary key assumptions
monkey - patch full_reindex_async because of bad primary key assumptions
# TODO remove any eager loading
scope
<not_specific>