diff --git a/app/controllers/api/statistics_controller.rb b/app/controllers/api/statistics_controller.rb index 75f92701b..7dca1b347 100644 --- a/app/controllers/api/statistics_controller.rb +++ b/app/controllers/api/statistics_controller.rb @@ -20,7 +20,7 @@ class API::StatisticsController < API::ApiController def scroll authorize :statistic, :scroll? - results = Elasticsearch::Client.new.scroll scroll: params[:scroll], scroll_id: params[:scrollId] + results = Elasticsearch::Model.client.scroll scroll: params[:scroll], scroll_id: params[:scrollId] render json: results end