Recent

bsearch_did_you_mean_candidate_capfilterPro only

bsearch_did_you_mean_candidate_cap

Shared first-letter + length-window prefilter + wz_levenshtein lookup.

Used by both the search-log corpus (Fuzzy_Search) and the content-index corpus (Spell_Dictionary). SOUNDEX() is not used because it rejects single-edit typos it should catch (e.g. SOUNDEX(‘WordPress’) != SOUNDEX(‘wordpess’)).

Type: filter
Since: 4.4.0
Source: includes/class-fuzzy-search.php line 504

Parameters

Type Name Description
string $token Search token.
string $table Fully-prefixed table name.
string $word_col Word column name.
string $freq_col Frequency column name.
int $min_freq Minimum frequency to qualify. Default 0.

Usage

add_filter( 'bsearch_did_you_mean_candidate_cap', function($token, $table, $word_col, $freq_col, $min_freq) {
    // ...
    return $token;
} );