Use full text search

This commit is contained in:
Michael 2023-09-21 23:27:05 +00:00
parent fac76a33df
commit 508d84b2b7
10 changed files with 173 additions and 121 deletions

View file

@ -376,8 +376,7 @@ class Timeline extends BaseModule
$condition = [];
if (!empty($channel->fullTextSearch)) {
$first = $this->database->selectFirst('post-engagement', ['uri-id']);
$condition = DBA::mergeConditions($condition, ["`uri-id` IN (SELECT `uri-id` FROM `post-content` WHERE `uri-id` >= ? AND MATCH (`title`, `content-warning`, `body`) AGAINST (? IN BOOLEAN MODE))", $first['uri-id'], $channel->fullTextSearch]);
$condition = DBA::mergeConditions($condition, ["MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", $channel->fullTextSearch]);
}
if (!empty($channel->includeTags)) {