SearchWP

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