diff --git a/app/models/doi.rb b/app/models/doi.rb index e61df884a..bf297324e 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: 25) 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: 10) do |dois| response = Doi.__elasticsearch__.client.bulk \ index: Doi.index_name, type: Doi.document_type,