SearchWP

This Documentation is for SearchWP Version 3

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:

<?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 );
view raw functions.php hosted with ❤ by GitHub

Parameters

Parameter Type Description
$forced Boolean

Whether to force fuzzy matching

$args Array

$args['engine'] The engine being used

[wpforms id="3080"]