Fuzzy Search
Fuzzy Search ranks rows by how closely a column resembles the text you type, even if letters are missing. It keeps every row and adds a _fuzzy_score column, highest first. Rows with no match get NULL and go last. Case is ignored.
Search company names
Manual Input holds four company names. Fuzzy Search looks for nrthwnd in the company column, with its vowels missing.
Fuzzy Search interactive example
Loading interactive example…
The live example needs a desktop screen. The result it produces is shown here, and the explanation and settings below work on any screen.
| company | _fuzzy_score |
|---|---|
| Northwind Traders | 135 |
| North Wind Farm | 135 |
| Nordic Trade | |
| Harbor Foods |
- Look at the preview. Northwind Traders and North Wind Farm come first with a score of 135. Nordic Trade and Harbor Foods have NULL because they don't contain those letters in that order.
- Change Query to
harbor. Harbor Foods moves to the top with a score, and the other three have NULL.
When to use
Use Fuzzy Search to find rows when you only roughly know how a value is spelled, such as a customer name typed in different ways. Follow it with Filter on _fuzzy_score to keep only the matches. To link two tables by similar text, use Fuzzy Match. To order rows exactly, use Sort.
To link two tables by similar text, use Fuzzy Match.
To keep only rows above a score, use Filter.
Inputs and outputs
Inputs
1 port- InRequired
Accepts: Tables, Geospatial data.
Accepts one connection on this port.
Outputs
1 port- Out
Configure the block
- Column
Column to compare.
- Query
Value to match against. Case is ignored.
Fuzzy Search FAQs
- Does Fuzzy Search remove rows?
- No. It keeps every row. Rows with no match have NULL in _fuzzy_score and go last. To keep only matches, follow it with Filter on _fuzzy_score.
- Does case matter?
- No. Case is ignored when the column is compared with the query.
- How is it different from Fuzzy Match?
- Fuzzy Search compares one table with a term you type. Fuzzy Match links two tables by similar text.
Prepare your data. Build it in Strata.
Strata opens in your browser, with no account.