diff --git a/lib/searchkick/bulk_indexer.rb b/lib/searchkick/bulk_indexer.rb
index <HASH>..<HASH> 100644
--- a/lib/searchkick/bulk_indexer.rb
+++ b/lib/searchkick/bulk_indexer.rb
@@ -24,7 +24,7 @@ module Searchkick
           # to get the max _id without scripting since it's a string
 
           # TODO use primary key and prefix with table name
-          relation = relation.where("id > ?", total_docs)
+          relation = relation.where("id > ?", index.total_docs)
         end
 
         relation = relation.select("id").except(:includes, :preload) if async
Fix the total docs call after import logic move (#<I>)

This fix the call after move on commit fd<I>e<I>ec<I>a<I>d9f4ed<I>ede7ec.