From 56373175854c364f85c6f9f51f5f9f3629b7cdfe Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Tue, 16 Oct 2018 10:53:21 +0200 Subject: [PATCH] reduce doi index backlog batch size to 50 --- app/models/doi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/doi.rb b/app/models/doi.rb index f6b448dfc..4758ae711 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -250,7 +250,7 @@ def self.index_by_day(options={}) logger = Logger.new(STDOUT) - Doi.where("created >= ?", from_date.strftime("%F") + " 00:00:00").where("created < ?", until_date.strftime("%F") + " 00:00:00").where("updated > indexed").find_in_batches(batch_size: 100) do |dois| + Doi.where("created >= ?", from_date.strftime("%F") + " 00:00:00").where("created < ?", until_date.strftime("%F") + " 00:00:00").where("updated > indexed").find_in_batches(batch_size: 50) do |dois| response = Doi.__elasticsearch__.client.bulk \ index: Doi.index_name, type: Doi.document_type,