Available since: 3.0
searchwp_fuzzy_digit_threshold
View Parameters »When finding partial matches (specifically when finding fuzzy matches) SearchWP will take an extra step to avoid applying fuzzy logic to terms that contain too many digits. This is because of how SearchWP’s fuzzy matching works: it finds linguistic similarities between words. When there are too many digits in a term fuzzy matching will never succeed.
You have control over the threshold SearchWP uses when defining ‘too many’ digits:
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 digit threshold. | |
add_filter( 'searchwp_fuzzy_digit_threshold', function( $threshold ) { | |
return 90; | |
} ); |
Parameters
Parameter | Type | Description |
---|---|---|
$threshold |
Integer |
Threshold to use |