From 4abe3be321a620641b9a316b168ce754d7438eff Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 14 Jul 2020 18:10:35 +0200 Subject: Change `tootctl search deploy` algorithm (#14300) --- app/chewy/statuses_index.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/chewy/statuses_index.rb') diff --git a/app/chewy/statuses_index.rb b/app/chewy/statuses_index.rb index d4b05fca9..47cb856ea 100644 --- a/app/chewy/statuses_index.rb +++ b/app/chewy/statuses_index.rb @@ -31,7 +31,7 @@ class StatusesIndex < Chewy::Index }, } - define_type ::Status.unscoped.kept.without_reblogs.includes(:media_attachments), delete_if: ->(status) { status.searchable_by.empty? } do + define_type ::Status.unscoped.kept.without_reblogs.includes(:media_attachments, :preloadable_poll) do crutch :mentions do |collection| data = ::Mention.where(status_id: collection.map(&:id)).where(account: Account.local, silent: false).pluck(:status_id, :account_id) data.each.with_object({}) { |(id, name), result| (result[id] ||= []).push(name) } -- cgit