Note: You are viewing the documentation for Version 3View Version 4 Docs

Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 1.0

searchwp_load_maximum

View Parameters »

If you’re running SearchWP on a Linux-based server the indexer will keep an eye on the server load (how hard the processor is working) and automatically throttle the aggressiveness of the indexer so as to not exhaust server resources and have a negative effect for site visitors.

By default SearchWP views a load of 2 as the threshold to watch out for. If the server load breaches 2.00 SearchWP will automatically inject a throttling mechanism to reduce the aggressiveness of the indexer thereby allowing the load to stabilize. If you are running a server that has more than two cores, you can increase this threshold if you’d like. While PHP isn’t able to directly take advantage of multiple processor cores, allowing for a larger threshold when applicable can allow for speed improvements with the indexer.

Please be careful when using this hook.

To increase the threshold SearchWP uses as a ceiling for acceptable server load you can add something like the following to your theme’s functions.php:

<?php
function my_searchwp_load_maximum( $load_threshold ) {
return 3; // allow the server load to reach 3.00
}
add_filter( 'searchwp_load_maximum', 'my_searchwp_load_maximum' );
view raw gistfile1.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$load_threshold Integer|Float

What SearchWP considers the load ceiling

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP