From 21bf32635687770bc0026d769a69f49b89f8a0a2 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 19 Feb 2023 20:28:40 -0500 Subject: Autofix Rubocop Rails/Pluck (#23730) --- app/lib/importer/base_importer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/lib/importer/base_importer.rb') diff --git a/app/lib/importer/base_importer.rb b/app/lib/importer/base_importer.rb index ea522c600..0cd1d3422 100644 --- a/app/lib/importer/base_importer.rb +++ b/app/lib/importer/base_importer.rb @@ -45,7 +45,7 @@ class Importer::BaseImporter # Remove documents from the index that no longer exist in the database def clean_up! index.scroll_batches do |documents| - ids = documents.map { |doc| doc['_id'] } + ids = documents.pluck('_id') existence_map = index.adapter.target.where(id: ids).pluck(:id).each_with_object({}) { |id, map| map[id.to_s] = true } tmp = ids.reject { |id| existence_map[id] } -- cgit