diff --git a/config/sql/se/Ebooks.sql b/config/sql/se/Ebooks.sql index 795abf7d..b6f7c376 100644 --- a/config/sql/se/Ebooks.sql +++ b/config/sql/se/Ebooks.sql @@ -33,5 +33,6 @@ CREATE TABLE IF NOT EXISTS `Ebooks` ( FULLTEXT `idxSearch` (`IndexableText`), FULLTEXT `idxSearchTitle` (`Title`), FULLTEXT `idxSearchAuthors` (`IndexableAuthors`), - FULLTEXT `idxSearchCollections` (`IndexableCollections`) + FULLTEXT `idxSearchCollections` (`IndexableCollections`), + FULLTEXT `idxSearchCombined` (`IndexableText`, `Title`, `IndexableAuthors`, `IndexableCollections`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/lib/Ebook.php b/lib/Ebook.php index c18ce5e0..a22627c2 100644 --- a/lib/Ebook.php +++ b/lib/Ebook.php @@ -2481,7 +2481,7 @@ final class Ebook{ match(e.IndexableText) against (?) ) as RelevanceScore '; - $whereCondition .= ' and match(e.IndexableText) against(?) '; + $whereCondition .= ' and match(e.IndexableText, e.Title, e.IndexableAuthors, e.IndexableCollections) against(?) '; $params[] = $query; if($sort == null || $sort == Enums\EbookSortType::Relevance || $sort == Enums\EbookSortType::Newest){