diff options
author | Aboobacker MK <aboobacker@redpanthers.co> | 2018-03-04 00:15:06 +0530 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-03-03 19:45:06 +0100 |
commit | 49092945ab86725180e202945ae1bec03a32a634 (patch) | |
tree | 6844e57a3735b91bc9c92ca65e9af609a350aeeb /app/services/search_service.rb | |
parent | c82a2358bd051fb5313abd04de0722e12d4ebc07 (diff) |
Fix 500 while searching after deleting a post (#6604)
Fixes #6602
Diffstat (limited to 'app/services/search_service.rb')
-rw-r--r-- | app/services/search_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/search_service.rb b/app/services/search_service.rb index fe98566866d..00a8b3dd77d 100644 --- a/app/services/search_service.rb +++ b/app/services/search_service.rb @@ -29,7 +29,9 @@ class SearchService < BaseService def perform_statuses_search! statuses = StatusesIndex.filter(term: { searchable_by: account.id }) .query(multi_match: { type: 'most_fields', query: query, operator: 'and', fields: %w(text text.stemmed) }) - .limit(limit).objects + .limit(limit) + .objects + .compact statuses.reject { |status| StatusFilter.new(status, account).filtered? } end |