Available since: 3.0
searchwp_partial_matches_force_fuzzy
View Parameters »When finding partial matches SearchWP will first find partial matches and if no partial matches are found it will then seek fuzzy matches.
If you would like to force SearchWP to find fuzzy matches despite having found partial matches, 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 | |
// Force SearchWP to perform fuzzy matching when finding partial matches. | |
add_filter( 'searchwp_partial_matches_force_fuzzy', function( $forced, $args ) { | |
// $args['engine'] is the engine being used | |
return true; // true/false | |
}, 20, 2 ); |
Parameters
Parameter | Type | Description |
---|---|---|
$forced |
Boolean |
Whether to force fuzzy matching |
$args |
Array |
|