Skip to content

Commit

Permalink
limit total number of paged results to 10000
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 18, 2018
1 parent f223890 commit da69198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def index
end

total = response.results.total
total_pages = page[:size] > 0 ? (total.to_f / page[:size]).ceil : 0
total_pages = page[:size] > 0 ? ([total.to_f, 10000].min / page[:size]).ceil : 0

states = total > 0 ? facet_by_key(response.response.aggregations.states.buckets) : nil
resource_types = total > 0 ? facet_by_resource_type(response.response.aggregations.resource_types.buckets) : nil
Expand Down

0 comments on commit da69198

Please sign in to comment.