dd42f0a098
The data import path (Account::DataTransfer) uses insert_all! which bypasses ActiveRecord callbacks, so imported cards and comments never get search records created and are invisible to search and card-table filtering. This script reindexes all published cards and comments created before a cutoff date (default 2026-04-01). The reindex method is an upsert so already-indexed records get a harmless update. Usage: bin/rails runner script/maintenance/reindex_stale_search_records.rb bin/rails runner script/maintenance/reindex_stale_search_records.rb 2026-01-01