searchwp\query\partial_matches\fuzzy\threshold
Seit: 4.0.0
Steuern Sie den Schwellenwert, der bestimmt, ob eine potenzielle unscharfe Teilübereinstimmung als Treffer gilt.
Parameter
| Typ | Parameter | Standard | Seit |
|---|---|---|---|
| Ganzzahl | $threshold |
70 |
4.0.0 |
Beispiele
All hooks should be added to your custom SearchWP Customizations Plugin.
Fuzzy-Abgleich strenger gestalten
Erhöhen Sie den Schwellenwert für das, was als Fuzzy-Abgleich gilt, und machen Sie den Fuzzy-Abgleich strenger
This file contains hidden or 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 | |
| // Make SearchWP's fuzzy matching more strict. | |
| // The scale is 0-100 going from furthest match (lowest, 0) | |
| // to closest match (highest, 100). | |
| add_filter( 'searchwp\query\partial_matches\fuzzy\threshold', function( $threshold ) { | |
| return 80; | |
| } ); |

