Available since: 3.0
searchwp_fuzzy_threshold
View Parameters »When finding partial matches (specifically when finding fuzzy matches) SearchWP will limit fuzzy matches depending on how closely terms sound alike on a scale from 0
to 100
. You can customize the threshold using this hook:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Increase SearchWP's fuzzy matching threshold. | |
add_filter( 'searchwp_fuzzy_threshold', function( $threshold ) { | |
return 80; | |
} ); |
Parameters
Parameter | Type | Description |
---|---|---|
$threshold |
Integer |
Minimum threshold to consider a fuzzy match |