Glossary

Typo tolerance

Typo tolerance is a search feature that returns the right results even when the query contains spelling mistakes, by matching query words to indexed words that differ by one or two characters.

Typo tolerance is the ability of a search engine to return relevant results when the query is misspelled. If a user types “iphnoe case” or “recieve invoice”, a typo-tolerant search still finds “iPhone case” and “receive invoice” by accepting index terms that are one or two character edits away from what was typed. It is built on fuzzy search techniques such as edit distance, wrapped in product rules that decide how many typos to allow, on which words, and how typo matches rank against exact ones. Most hosted search engines turn it on by default because a search box that fails on a single wrong letter loses users quickly.

How typo tolerance works

Under the hood, the engine compares each query word with the terms in its index and counts the edits between them: an inserted letter, a missing letter, a wrong letter, or two letters swapped. A match within the allowed number of edits counts as a typo match. “Recieve” is one transposition away from “receive”, so it matches at one typo. “Acommodation” is one insertion away from “accommodation”. The engine finds these candidates quickly by walking its term dictionary with a structure built for edit distance, such as a Levenshtein automaton, rather than checking every term in turn.

The product rules on top are what make typo tolerance feel helpful rather than noisy. The most important is a minimum word length. Short words have many close neighbours, so allowing a typo on “cat” would match “car”, “cut”, “bat” and dozens more. Engines therefore allow no typos below a threshold, one typo above it and two typos on longer words. Algolia, Typesense and Meilisearch each set their own default thresholds and let you change them; the common pattern is roughly one typo from four or five characters and two typos from eight or nine. Many engines also treat the first letter as fixed, since people rarely mistype the start of a word, and apply typo tolerance to the final, partly typed word as a prefix so search-as-you-type works.

How typo matches are ranked

Allowing typos only helps if correct matches still come first. Typo-tolerant engines rank results with the number of typos as an explicit signal: documents that match the query exactly rank above documents that match with one typo, which rank above those with two. Algolia, for example, lists typo count as one of its ranking criteria, applied before attributes such as proximity and custom popularity. In engines built on BM25, the fuzzy matches are usually scored lower than exact term matches through a boost or penalty.

A worked example shows why this ordering matters. In an electronics catalogue, the query “sonny headphones” contains one typo. Exact matching returns nothing for “sonny”. Typo tolerance maps it to “sony” (one deletion) and also to “sunny” (one substitution). Because both are one-typo matches, other signals such as the second word, “headphones”, decide the order, and the Sony headphones rank above a “Sunny Days” poster. If the query had been “sony headphones”, the exact matches would outrank any typo matches automatically.

Rule

Typical setting

Why it exists

Minimum length for one typo

About 4 to 5 characters

Short words have too many close neighbours

Minimum length for two typos

About 8 to 9 characters

Two edits on a medium word changes its meaning

First letter

Often must match

Start-of-word typos are rare

Ranking

Fewer typos rank higher

Exact matches should win

Disabled fields

IDs, SKUs, numbers, emails

A near match is a wrong match

Prefix on last word

Usually on

Supports search-as-you-type

Where typo tolerance should be off

Typo tolerance is a recall tool, and it lowers precision wherever exactness matters. Product codes, order numbers, invoice numbers, postcodes and email addresses should not match a neighbour that differs by one character. A search for order “48213” returning order “48218” is worse than returning nothing. Most engines let you disable typo tolerance per attribute, disable it on numeric tokens, or supply a list of words that must always match exactly. Brand names and acronyms sometimes belong on that list too, because a typo match can map a rare brand onto a common word.

It can also interact badly with stemming and synonyms. If the engine first stems a misspelled word, then applies typo tolerance to the stem, the result can drift a long way from the user’s intent. Testing with a set of real misspelled queries and labelled results, a small golden dataset, is the reliable way to catch these interactions. Watch precision and recall together: a typo setting that raises recall by five points but drops precision by ten is usually a step back.

Typo tolerance vs spell correction

Spell correction, the “did you mean” feature, takes a different route to the same goal. It rewrites the query to its most likely correct spelling, using a dictionary or a model trained on query logs, and then runs an exact search on the rewritten query. Typo tolerance leaves the query alone and widens the match instead. Spell correction gives users a visible suggestion and keeps precision high, but it fails when the correction is wrong or when the “misspelling” is a real term in your domain. Typo tolerance handles unknown words and jargon more gracefully because it only needs the correct spelling to exist somewhere in the index.

Many search systems use both, and LLM-based systems add a third option: query rewriting with a language model, which can fix spelling, expand abbreviations and rephrase vague questions in one step. That works well for agents, since the model writing the query rarely misspells anything, but it adds latency and a model call to every search. For queries typed by people, typo tolerance at the index remains the cheapest safeguard.

Typo tolerance in semantic and hybrid search

Semantic search has a built-in degree of typo resistance. An embedding model breaks text into subword tokens during tokenization, so a misspelled word is split into familiar pieces, and the resulting vector usually lands near the correct one. That resistance weakens on short queries, rare names and technical terms, where a single wrong letter can change the tokens enough to move the vector somewhere unhelpful. Dense retrieval is also poor at exact identifiers, which is the opposite problem.

Hybrid search solves both by running a typo-tolerant keyword search alongside vector search and merging the ranked lists, often with reciprocal rank fusion. The keyword side catches misspelled names and keeps exact codes precise, while the vector side handles paraphrases and different vocabulary. Hybrid search vs vector search sets out the trade-offs, and the post on hybrid search for SKUs looks at the identifier problem in practice.

Typo tolerance across languages and keyboards

Edit distance treats every character the same, but real typos are not random. Most come from neighbouring keys, doubled or dropped letters, and swapped pairs, and some engines weight edits by keyboard distance so that “sonu” for “sony” counts as a closer match than an arbitrary substitution. Languages add more variation. Accented characters are usually normalised first, so “cafe” matches “café” without spending a typo. Compound-heavy languages such as German produce long words where two typos may still be too strict, while languages written without spaces, such as Chinese and Japanese, rely on segmentation and character-level matching instead of word-level typo rules. Phonetic misspellings, where a user writes a word the way it sounds, are another category that edit distance handles only partly. If your users search in several languages or scripts, test typo tolerance in each one separately, because a default tuned for English can be either too loose or too strict elsewhere.

Typos in the content, not just the query

Typos are not only a query problem. Text produced by OCR on scanned documents, speech-to-text transcripts of calls and meetings, and notes typed quickly by people all contain their own misspellings. A correctly spelled query for a customer’s name can miss a transcript where the name was transcribed slightly wrong. Typo tolerance on the index side catches many of these cases, which matters for agents that search meeting recordings, call transcripts and scanned paperwork. It is one reason OCR accuracy and word error rate have a direct effect on search quality downstream.

How Exabase handles typos

Typo tolerance is on by default in Exabase, with nothing to configure. Deep Search runs every text query as a hybrid of semantic search and typo-tolerant keyword matching, so a misspelled query still reaches the right passage while the semantic side catches different wording. To force an exact match for a product code, a name or an error message, wrap the phrase in double quotes. Content stored as Resources, including OCR text from images and transcripts of audio and video, is indexed automatically, so typo-tolerant matching covers that content too, and results come back as sub-document chunks with page numbers or timestamps.

The precision parameter, from 0 to 1, widens or narrows results per query, and metadata filtering narrows them by tag, folder, type or date. The searching resources guide and the search API reference show the request. Exabase provides the search layer, and the interface your users type into stays in your product. For teams comparing hosted engines, Exabase vs Typesense, Algolia alternatives and Typesense vs Meilisearch cover the options.

Frequently asked questions

What is typo tolerance in search?

Typo tolerance lets a search engine return the right results when the query is misspelled. It matches query words to indexed words that differ by one or two characters, and ranks exact matches above typo matches.

How many typos does typo tolerance allow?

Usually one or two per word, depending on word length. Short words typically allow none, medium words allow one and long words allow two, with exact thresholds set by each engine and usually configurable.

What is the difference between typo tolerance and fuzzy search?

Fuzzy search is the general technique of matching approximately similar strings. Typo tolerance is how search products apply it to user queries, with rules on word length, first letters, prefixes and ranking.

Does typo tolerance hurt search precision?

It can. Every allowed typo brings in more candidate matches, some of them wrong. Ranking exact matches first and disabling typo tolerance on codes, numbers and identifiers keeps the loss small.

Is typo tolerance the same as spell correction?

No. Spell correction rewrites the query to a corrected spelling before searching, while typo tolerance keeps the query and widens what counts as a match. Many systems use both.

Do semantic search and embeddings handle typos?

Partly. Embeddings tolerate many misspellings because of subword tokenization, but they are less reliable on short queries, rare names and technical terms. Hybrid search adds a typo-tolerant keyword side to cover those cases.

Does Exabase support typo tolerance?

Yes. Deep Search uses typo-tolerant keyword matching together with semantic search on every text query, with no setup. Put a phrase in double quotes when you need an exact match.

Related pages: fuzzy search, stemming, lemmatization, query rewriting, full-text search, hybrid search, Exabase vs Algolia, when keyword beats semantic, documentation assistants, RAG accuracy

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.