From d6806025a03081d5438f60c6876a6ad1aad97494 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 10 Jan 2020 20:58:22 -0600 Subject: avoid double-filtering on search --- app/services/search_service.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'app') diff --git a/app/services/search_service.rb b/app/services/search_service.rb index ff6cc2197..73ff785c9 100644 --- a/app/services/search_service.rb +++ b/app/services/search_service.rb @@ -24,11 +24,6 @@ class SearchService < BaseService def search_for results = Status.search_for(@query.gsub(/\A#/, ''), @account, @limit, @offset) - return results if results.empty? - account_ids = results.pluck(:account_id) - account_domains = results.map(&:account_domain) - preloaded_relations = relations_map_for_account(@account, account_ids, account_domains) - results.reject { |status| StatusFilter.new(status, @account, preloaded_relations).filtered? } end def perform_accounts_search! -- cgit