Skip to content

Commit

Permalink
reduce batch size for doi indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 17, 2018
1 parent 4357d18 commit 8b47408
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: 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,
Expand Down

0 comments on commit 8b47408

Please sign in to comment.