From 384be2e254b0c48e1caefadfc8f4154d1c27b1f9 Mon Sep 17 00:00:00 2001 From: Erich Kist Date: Thu, 28 Jun 2018 22:44:34 -0300 Subject: [PATCH] Fix the total docs call after import logic move (#1170) --- lib/searchkick/bulk_indexer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/searchkick/bulk_indexer.rb b/lib/searchkick/bulk_indexer.rb index 580c1c9..67122fc 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 -- libgit2 0.21.0