Skip to content

Commit

Permalink
reduce batch size for index updates to 25
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 16, 2018
1 parent 36bb8a7 commit bb0000e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: 50) 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: 25) do |dois|
response = Doi.__elasticsearch__.client.bulk \
index: Doi.index_name,
type: Doi.document_type,
Expand Down

0 comments on commit bb0000e

Please sign in to comment.