Available since: 3.0
searchwp_fuzzy_min_length
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 are considered too short. If you’d like to customize the minimum length of words SearchWP will consider for fuzzy matching you can use 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 match minimum length. | |
add_filter( 'searchwp_fuzzy_min_length', function( $length ) { | |
return 4; | |
} ); |
Parameters
Parameter | Type | Description |
---|---|---|
$length |
Integer |
Minimum word length for fuzzy matches |