Skip to content

Commit

Permalink
Revert "Only search Content, not Content and Subject, for better inde…
Browse files Browse the repository at this point in the history
…xing"

This reverts commit 8450f0a.

As we support to separate fulltext search terms from others in 8788a99,
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.
  • Loading branch information
sunnavy committed Jan 23, 2024
1 parent 8788a99 commit b0109dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/RT/Search/Simple.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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]'";
}
Expand Down

0 comments on commit b0109dc

Please sign in to comment.