searchwp\query\partial_matches\fuzzy\force
4.0.0以降
デフォルトでは(部分一致が有効な場合)、SearchWPは2段階の部分一致ロジックを適用します。最初の段階は直接部分一致の適用であり、部分一致が見つからない場合には、別のレベルのあいまい一致ロジックが適用されます。
このフックは、部分一致が見つかった場合でも、あいまい一致ロジックを強制的に適用させることができます。
パラメータ
| タイプ | パラメータ | デフォルト | 提供開始 |
|---|---|---|---|
| ブール値 | $enabled |
false |
4.0.0 |
例
All hooks should be added to your custom SearchWP Customizations Plugin.
あいまい一致を強制的に見つける
部分一致が見つかった場合でも、SearchWPにあいまい一致を見つけさせる(通常は起こらない)
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 | |
| // Force SearchWP's fuzzy logic to be applied even when partial matches are found. | |
| add_filter( 'searchwp\query\partial_matches\fuzzy\force', '__return_true' ); |

