This Documentation is for SearchWP Version 3

Available since: 2.9


View Parameters »

SearchWP’s algorithm is based on the concept of weight. We can think of weight as a way to give a numeric value to the relevance of a result. The more weight the higher the relevance the higher it will appear on a results page.

The default maximum weight in the engine configuration UI is 100, you can use the searchwp_weight_max filter to change that like so:

// Increase the maximum available SearchWP weight to 500
function my_searchwp_weight_max( $weight ) {
return 500;
add_filter( 'searchwp_weight_max', 'my_searchwp_weight_max' );
view raw functions.php hosted with ❤ by GitHub


Parameter Type Description
$weight Integer

The maximum weight available in the engine configuration UI

[wpforms id="3080"]