Skip to content

Commit

Permalink
Added subject to MATCH
Browse files Browse the repository at this point in the history
  • Loading branch information
tinoest committed Feb 21, 2021
1 parent 8db1214 commit 429e412
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/subs/Search/API/Fulltext.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public function indexedWordQuery($words, $search_data)

if (!empty($modSettings['search_simple_fulltext']))
{
$query_where[] = 'MATCH (body) AGAINST ({string:body_match})';
$query_where[] = 'MATCH (body, subject) AGAINST ({string:body_match})';
$query_params['body_match'] = implode(' ', array_diff($words['indexed_words'], $query_params['excluded_index_words']));
}
else
Expand All @@ -284,7 +284,7 @@ public function indexedWordQuery($words, $search_data)
// If we have bool terms to search, add them in
if ($query_params['boolean_match'])
{
$query_where[] = 'MATCH (body) AGAINST ({string:boolean_match} IN BOOLEAN MODE)';
$query_where[] = 'MATCH (body, subject) AGAINST ({string:boolean_match} IN BOOLEAN MODE)';
}
}

Expand Down

0 comments on commit 429e412

Please sign in to comment.