feat(search): ✨ add inline search field
This commit is contained in:
parent
de1f1446a3
commit
05996b2ebf
10 changed files with 231 additions and 32 deletions
|
@ -439,7 +439,7 @@ class MySQLHandler
|
|||
if(strlen($options['text']) > 0) {
|
||||
$text_search_scores = [0];
|
||||
$text_search_wheres = [];
|
||||
foreach([['title', 6], ['brief', 4], ['markdown', 1]] as $arg) {
|
||||
foreach([['title', 15], ['brief', 6], ['markdown', 1]] as $arg) {
|
||||
$text_search_scores []= "((MATCH(post_" . $arg[0] . ") AGAINST (?)) * " . $arg[1] . ')';
|
||||
$qry_select_data []= $options['text'];
|
||||
$qry_select_types .= 's';
|
||||
|
@ -462,7 +462,7 @@ class MySQLHandler
|
|||
}
|
||||
|
||||
if(count($qry_wheres) == 0) {
|
||||
throw new Exception("No search filtering options supplied!");
|
||||
return [];
|
||||
}
|
||||
|
||||
$options['offset'] ??= 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue