Note: You are viewing the documentation for Version 4View Version 3 Docs


Since: 4.0.0

Table of Contents

By default (when partial matching is enabled) SearchWP will apply two levels of partial matching logic. The first will be the application of direct partial matches, and if no partial matches are found another level of fuzzy logic will be applied.

This hook can force that fuzzy logic to be applied even if partial matches have been found.


Type Parameter Default Since
Boolean $enabled false 4.0.0


All hooks should be added to your custom SearchWP Customizations Plugin.

Force fuzzy matches to be found

Force SearchWP to find fuzzy matches even if partial matches are found (which would normally not happen)

// Force SearchWP's fuzzy logic to be applied even when partial matches are found.
add_filter( 'searchwp\query\partial_matches\fuzzy\force', '__return_true' );

How to use this code

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP