mirror of
https://github.com/standardebooks/web.git
synced 2025-07-21 06:45:14 -04:00
RelevanceScore not relevance_score
This commit is contained in:
parent
0c87f1f262
commit
660f8b5e3e
1 changed files with 3 additions and 3 deletions
|
@ -2487,13 +2487,13 @@ final class Ebook{
|
|||
match(e.IndexableAuthors) against (?) * ' . EBOOK_SEARCH_WEIGHT_AUTHORS . ' +
|
||||
match(e.IndexableCollections) against (?) * ' . EBOOK_SEARCH_WEIGHT_COLLECTIONS . ' +
|
||||
match(e.IndexableText) against (?)
|
||||
) as relevance_score ';
|
||||
) as RelevanceScore ';
|
||||
|
||||
$whereCondition .= ' and match(e.IndexableText) against(?) ';
|
||||
$params[] = $query;
|
||||
|
||||
if($sort == null || $sort == Enums\EbookSortType::Relevance || $sort == Enums\EbookSortType::Newest){
|
||||
$orderBy = 'relevance_score desc, e.EbookCreated desc';
|
||||
$orderBy = 'RelevanceScore desc, e.EbookCreated desc';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2507,7 +2507,7 @@ final class Ebook{
|
|||
', $params);
|
||||
|
||||
if($relevanceScoreField != ''){
|
||||
// `relevance_score` is at the beginning of the query, so these params must go at the start of the array.
|
||||
// `RelevanceScore` is at the beginning of the query, so these params must go at the start of the array.
|
||||
array_unshift($params, $query, $query, $query, $query);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue