I wrote a letter to WordPress with a proposal on how to speed up searches 10 times.
But they do not respond.
​
Use the full-text index on search fields (post\_title,post\_excerpt, post\_content) and replace “like” with the “match”.
//$search .= $wpdb->prepare( “{$searchand}(({$wpdb->posts}.post\_title $like\_op %s) $andor\_op ({$wpdb->posts}.post\_excerpt $like\_op %s) $andor\_op ({$wpdb->posts}.post\_content $like\_op %s))”, $like, $like, $like );
$search .= $wpdb->prepare( “{$searchand} MATCH({$wpdb->posts}.post\_title, {$wpdb->posts}.post\_excerpt, {$wpdb->posts}.post\_content) AGAINST(‘%s’ IN NATURAL LANGUAGE MODE)”, $wpdb->esc\_like( $term ) );
[ad_2]
I’m listening, how does it work
with 5000 long posts search so slow and expensive that 5 searches per second load core by 100%
WordPress is open source. Anyone can submit code suggestions