Fuzzy Search

The “Fuzzy Search” module allows the table search to match results that are not necessarily exactly the same as the search term. Rows will be found even if a search term has typos, spelling mistakes or misspellings, partial matches, or is written in a dialect.

By loosening the search criteria, fuzzy search or approximate string matching improves accuracy and user satisfaction, especially for sites with a diverse audience or complex search terms. This is ideal for ecommerce sites, educational resources, or content-heavy platforms where users might not always type exact keywords.

Feature description

A common example for use of fuzzy search e.g. in databases is name searching. While “Smith” and “Smythe” are pronounced in the same way, a regular search for “Smith” would not find “Smythe”, whereas a fuzzy search would. Other often seen cases are spelling variations of words e.g. in British and US English, like “colour” vs. “color”.

The following examples show some possible uses.

Fuzzy search with toggle control

In this table with fictional data, a search for the name “Smith” is performed. Note how rows with similar spellings of this name are also found. By hovering the mouse over the search field, the visitor can toggle between the “exact” (on rows matching “Smith” exactly) and the “fuzzy” search (similar rows are found as well).

To test this yourself, change the search term e.g. to “Mayer”.

First NameLast NameZIPPointsAverage
GloriaSmythe6743940.1

Showing the similarity score

To find all rows that match when doing a “fuzzy” search, the search algorithm calculates a “similarity score”, which can be interpreted as the percentage or degree to which the search term matches the row data. Showing this to the site visitor can give hints about the confidence for the search results. This table shows an example, see the last column:

First NameLast NameZIPPointsAverageSimilarity
GloriaSmythe6743940.1
GrahamBonner9072740.9
WarrenWheeler9913420.7
ZenaHale1980390.3
JuliaHaupt24116101.0
RachelSmith5895170.3
LionelBarry6503670.5
ZenaMiller1687450.6
DillonBradford9154370.4
HaleyMcleod9932140.1
AbraHouse9953760.1
ArielSmyth5655560.7
RoaryAyers1272030.5
MasonMoller8106230.6
GillianSimon69137100.7
RebekahFisher3257230.7
CameronWalls1878820.2
PhelanMeyer9541360.2
MonaFischer4891290.6
RashadWebb2799340.1
BrandonKinney0098620.2
SachaGould1772280.7
BrendaOsborn5213940.5
SophiaMeier7968830.2
BreeOrr7016090.7
YenBernard9921610.3
LacotaLe64964100.7
NaydaHorton42308100.1
LeeNavarro4891850.4
MargaretAustin2618170.3
BrynneRandolph6852380.9
OlegMayer3224990.4
MarkCooley5492330.2
BrendanSharp4751110.5
HollyCarrillo7168910.3
KelseyMoses2766150.8
GeraldineTyson9804930.6
JasperMaier9232930.5
NobleConley1486980.5
NatalieLuna6663780.7
McKenziePowell8625990.4
TylerDennis1367660.2
VladimirJefferson7856970.3
BrettPena1421810.8
DemetriusKey6798520.4
GwendolynSchmitt9732410.8
MarvinMiddleton1014120.7
NadineWalters2748460.7
ClaireSchmidt5421850.4
JimmyMiller4112360.5

Further details

Besides this “ranking column” that shows the similarity score and the toggle control that the site visitor can use to switch between “exact” and “fuzzy” search, the feature module also allows to configure the “threshold” at which a search results is said to be matching the search term.

Usage instructions

To use these features with your tables, activate the “Fuzzy Search” feature module on the “Modules” screen of TablePress Max. Then, configure the desired options in the “Fuzzy Search” section on the table’s “Edit” screen. You can fine-tune settings in the “Advanced settings” of that section as well.

Configuration parameters

To configure this module’s features, you can also use these configuration parameters in the “TablePress Table” block, the Elementor widget, or in the Shortcode that you are using to embed the table:

ModuleSlugConfiguration parameterNameDescriptionTypeDefault value
Fuzzy Searchdatatables-fuzzysearchdatatables_fuzzysearchboolean (true or false)false
Fuzzy Searchdatatables-fuzzysearchdatatables_fuzzysearch_thresholdfloat0.5
Fuzzy Searchdatatables-fuzzysearchdatatables_fuzzysearch_togglesmartboolean (true or false)true
Fuzzy Searchdatatables-fuzzysearchdatatables_fuzzysearch_rankcolumnstring"" (empty string)