feat(search): add inline search field

This commit is contained in:
David Bailey 2025-02-03 10:47:32 +01:00
parent de1f1446a3
commit 05996b2ebf
10 changed files with 231 additions and 32 deletions

View file

@ -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;