Browse Source

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

Fixes #6602
pull/4/head
Aboobacker MK 6 years ago
committed by Eugen Rochko
parent
commit
49092945ab
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      app/services/search_service.rb

+ 3
- 1
app/services/search_service.rb View File

@ -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

Loading…
Cancel
Save