Slow search

[ad_1]

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]
3 Comments

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer