DEV: improve verbose mode for reindexer

DEV: improve verbose mode for reindexer

This makes the verbose mode provide a bit of progress notification while reindexing as it can take many hours to do a giant site

diff --git a/app/jobs/scheduled/reindex_search.rb b/app/jobs/scheduled/reindex_search.rb
index a884ab7..9ec0bd4 100644
--- a/app/jobs/scheduled/reindex_search.rb
+++ b/app/jobs/scheduled/reindex_search.rb
@@ -60,17 +60,24 @@ module Jobs
       end
     end
 
-    def rebuild_problem_posts(limit: 20000, indexer: SearchIndexer)
+    def rebuild_problem_posts(limit: 20000, indexer: SearchIndexer, verbose: false)
       post_ids = load_problem_post_ids(limit)
+      verbose ||= @verbose
 
-      if @verbose
+      if verbose
         puts "rebuilding #{post_ids.length} posts"
       end
 
+      i = 0
       post_ids.each do |id|
         # could be deleted while iterating through batch
         if post = Post.find_by(id: id)
           indexer.index(post, force: true)
+          i += 1
+
+          if verbose && i % 1000 == 0
+            puts "#{i} posts reindexed"
+          end
         end
       end
     end

GitHub sha: 9ffc022c