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

searchwp\query\partial_matches\fuzzy

Since: 4.0.0

Table of Contents

Control whether partial matching logic uses fuzzy matching. By default (when enabled) SearchWP will utilize two levels of partial matching logic.

  1. Find partial matches that contain the search string
  2. If no partial matches are found attempt to find tokens that sound like search terms

Parameters

Type Parameter Default Since
Boolean $enabled true 4.0.0

Examples

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

Disable SearchWP's fuzzy logic when performing partial matches

Disable SearchWP’s fuzzy logic when performing partial matches

<?php
// Disable SearchWP's fuzzy logic when performing partial matches.
add_filter( 'searchwp\query\partial_matches\fuzzy', '__return_false' );

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