Skip to content
Snippets Groups Projects
Commit 49092945 authored by Aboobacker MK's avatar Aboobacker MK Committed by Eugen Rochko
Browse files

Fix 500 while searching after deleting a post (#6604)

Fixes #6602
parent c82a2358
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment