One thing I wondered is why the search does not use a MySQL index? Is it for performance? Below is the code for the search:
if (!empty($q[‘s’])) {
$q[‘s’] = addslashes_gpc($q[‘s’]);
$search = ‘ AND (‘;
$q[‘s’] = preg_replace(‘/, +/’, ‘ ‘, $q[‘s’]);
$q[‘s’] = str_replace(‘,’, ‘ ‘, $q[‘s’]);
$q[‘s’] = str_replace(‘”‘, ‘ ‘, $q[‘s’]);
$q[‘s’] = trim($q[‘s’]);
if ($q[‘exact’]) {
$n = ”;
} else {
$n = ‘%’;
}
if (!$q[‘sentence’]) {
$s_array = explode(‘ ‘,$q[‘s’]);
$q[‘search_terms’] = $s_array;
$search .= ‘((post_title LIKE \”.$n.$s_array[0].$n.’\’) OR (post_content LIKE \”.$n.$s_array[0].$n.’\’))’;
for ( $i = 1; $i < count($s_array); $i = $i + 1) {
$search .= ‘ AND ((post_title LIKE \”.$n.$s_array[$i].$n.’\’) OR (post_content LIKE \”.$n.$s_array[$i].$n.’\’))’;
}
$search .= ‘ OR (post_title LIKE \”.$n.$q[‘s’].$n.’\’) OR (post_content LIKE \”.$n.$q[‘s’].$n.’\’)’;
$search .= ‘)’;
} else {
$search = ‘ AND ((post_title LIKE \”.$n.$q[‘s’].$n.’\’) OR (post_content LIKE \”.$n.$q[‘s’].$n.’\’))’;
}
}