diff --git a/app/controllers/clients_controller.rb b/app/controllers/clients_controller.rb index f8bd3e493..8cc8ea0ff 100644 --- a/app/controllers/clients_controller.rb +++ b/app/controllers/clients_controller.rb @@ -62,6 +62,7 @@ def index query: params[:query], "provider-id" => params[:provider_id], software: params[:software], + "clientTypes" => params[:client_type], year: params[:year], "page[number]" => page[:number] + 1, "page[size]" => page[:size], diff --git a/app/models/concerns/indexable.rb b/app/models/concerns/indexable.rb index d858af55c..3805dbeb6 100644 --- a/app/models/concerns/indexable.rb +++ b/app/models/concerns/indexable.rb @@ -405,10 +405,10 @@ def index_stats(options={}) stats = client.indices.stats index: [index_name, alternate_index_name], docs: true index_name_count = stats.dig("indices", index_name, "primaries", "docs", "count") alternate_index_name_count = stats.dig("indices", alternate_index_name, "primaries", "docs", "count") - last_id = self.maximum(:id) || 1 + database_count = self.all.count message = "Index #{index_name} has #{index_name_count} documents, " \ - "#{alternate_index_name} has #{alternate_index_name_count} documents, last_id is #{last_id}." + "#{alternate_index_name} has #{alternate_index_name_count} documents, database has #{database_count} documents." return message end