Azure AI Search · Updated tutorial
Handle search typos with fuzzy matching
A versioned tutorial for indexing text and testing typo-tolerant queries through the current Azure AI Search REST API.
Fuzzy search can return text terms that are close to a user’s input. It is useful for simple misspellings, but it can also widen results and add query cost. Test it against real queries instead of treating it as automatic correction.
Microsoft’s current fuzzy-search documentation defines the supported syntax and limits. This updated tutorial replaces the original 2021 portal sequence, which used a preview API and public blob access.
Prepare a searchable index
Create or reuse an Azure AI Search index with the text fields you want to query marked as searchable. Load a small, representative data set through an approved source connection or push API.
Keep the source private. Choose managed identity, keys, network controls, and indexer permissions against your organisation’s security requirements. The search tutorial does not require anonymous blob access.

The diagram remains useful as a high-level data flow. Portal labels and setup screens have changed since it was captured.
Send a full Lucene fuzzy query
Set queryType to full and add ~ after each whole term that should allow a fuzzy match. This example uses the stable 2026-04-01 REST API documented by Microsoft at the time of this update:
POST https://{service-name}.search.windows.net/indexes/{index-name}/docs/search?api-version=2026-04-01{ "search": "seatle~ waterfront~ view~ hotle~", "queryType": "full", "searchMode": "any", "searchFields": "HotelName,Description", "select": "HotelName,Description,Address/City", "count": true}Microsoft lists 2026-04-01 as the current stable version in the Azure AI Search API version table. Pin an API version and review that table before upgrading.
Control edit distance and scope
The default fuzzy edit distance is two. Use ~1 to allow one insertion, deletion, substitution, or adjacent-character transposition. Use ~0 for an exact term.
Scope searchFields to fields where typo tolerance is useful. A broad fuzzy query can generate up to 50 expansions per term, introduce unexpected lexical matches, and respond more slowly than a simpler query.
Evaluate the result, not just the response code
Build a test set with correct spellings, common mistakes, short terms, names, and queries that must not match. Record:
- whether the intended document appears;
- which term produced the match;
- irrelevant results introduced by expansion;
- response time at representative scale;
- differences by language and analyzer.
Use Search Explorer or a REST client for iteration. Hit highlighting can help identify a fuzzy match, but Microsoft notes that it has limitations when queries use scoring profiles or more complex syntax.
If fuzzy expansion is too broad or slow, test language analyzers, synonym maps, or n-gram indexing. Each alternative changes storage, maintenance, and relevance behaviour, so compare them against the same test set.
Need a search design that fits the data?
Bring the corpus, query patterns, access boundary, and relevance measures.