From b0109dcd596690c50e6bd5bbd1c28ee78a35ae39 Mon Sep 17 00:00:00 2001 From: sunnavy Date: Tue, 23 Jan 2024 17:29:02 -0500 Subject: [PATCH] Revert "Only search Content, not Content and Subject, for better indexing" This reverts commit 8450f0a9f233d6a761ac22dbdf14926abc54d7fa. As we support to separate fulltext search terms from others in 8788a9923d, the performance penalty is gone for searches like Subject LIKE 'foo' OR Content LIKE 'foo' Via searching both Subject and Content, now we can cover cases where modified Subject is not included in any attachments. --- lib/RT/Search/Simple.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/RT/Search/Simple.pm b/lib/RT/Search/Simple.pm index f9702361a09..5da09c36d70 100644 --- a/lib/RT/Search/Simple.pm +++ b/lib/RT/Search/Simple.pm @@ -280,7 +280,7 @@ sub GuessType { sub HandleDefault { my $fts = RT->Config->Get('FullTextSearch'); if ($fts->{Enable} and $fts->{Indexed}) { - return default => "Content LIKE '$_[1]'"; + return default => "(Subject LIKE '$_[1]' OR Content LIKE '$_[1]')"; } else { return default => "Subject LIKE '$_[1]'"; }