Skip to main content

Overview

Typo tolerance ensures that customers find the products they’re looking for even when their search queries contain spelling mistakes, common acronyms, or typing errors. A shopper searching for “snekaers” will still see sneaker results, “espreso machine” will return espresso machines, and “lbd” will match “little black dress” products. This happens automatically and seamlessly, requiring no additional effort from the customer. The system applies corrections intelligently using AI, only making changes when there’s high confidence that a typo has occurred or an acronym can be reliably expanded. This prevents over-correction of intentional spellings while still catching common mistakes that would otherwise lead to poor or empty search results.

How typo correction works

Typo correction is handled by the query interpretation system, which analyzes search queries in the context of your store’s catalog. The system considers your store’s product types and descriptions to make accurate corrections. A query that looks like a typo in one store might be a valid product term in another. Corrections are cached automatically, so repeated searches for the same misspelled term are resolved instantly without additional processing. If the correction system is temporarily unavailable, searches proceed normally with the original query — you never lose search availability.

Types of errors detected

The system recognizes patterns that commonly occur during typing. Character proximity errors happen when a shopper accidentally hits an adjacent key on the keyboard, such as typing “shirr” instead of “shirt”. Missed characters are omissions that occur during fast typing, like “dres” instead of “dress”. Transposed letters are characters typed in the wrong order, such as “teh” instead of “the” or “recieve” instead of “receive”. Beyond simple typos, the system also handles phonetic misspellings where words are spelled as they sound rather than correctly. It also catches double-letter errors where a letter is accidentally repeated or a double letter is reduced to one.

Acronym and abbreviation expansion

The system recognizes widely used shopping acronyms and abbreviations and expands them to their full forms. For example, “lbd” is expanded to “little black dress” and “ooo” to “out of office”. This ensures customers using common shorthand still find relevant products even when no products in your catalog contain the abbreviated term. Only well-known, industry-standard acronyms are expanded. The system does not expand abbreviations that could be ambiguous or that are not widely recognized.

Numeric corrections

The system also corrects numeric values when confidence is high. For example, a search for “13k gold” is corrected to “14k gold” because 13-karat gold is not a standard jewelry measurement. These corrections rely on domain knowledge to distinguish genuine product specifications from likely mistakes.

High-confidence corrections only

The system only applies corrections when confidence is high. This conservative approach prevents the frustration of having intentional searches incorrectly “corrected” to something the customer didn’t want. If the system is uncertain whether something is a typo or an intentional search term, it leaves the query unchanged. Other search capabilities then help find relevant results.

What typo tolerance preserves

Certain types of text are intentionally left unchanged to preserve search accuracy for specialized queries.

Brand and product names

Brand names, model numbers, and product-specific terminology are not corrected, even if they appear to be misspellings of common words. A search for “Acne Studios” (the fashion brand) won’t be changed to “Acme Studios”, and product codes or SKUs remain intact.

Stylized spellings

Many brands and products use intentional non-standard spellings as part of their identity. The system recognizes that “Froot Loops” is not a misspelling of “Fruit Loops” and that “Krispy Kreme” should not be corrected to “Crispy Cream”. These stylized catalog spellings are preserved.

Niche and technical terms

Industry-specific terminology, technical specifications, and niche fashion or product terms are handled carefully. The system avoids correcting terms that might be unfamiliar but are legitimate product descriptors used in your catalog.

Regional spelling variations

Layers handles regional spelling differences intelligently based on the shopper’s location. A customer in the United Kingdom searching for “colour” will see results for color products, while an American customer’s search for “color” works equally well. The same applies to other regional variations like “grey” versus “gray” or “centre” versus “center”. When a query term is already correct and idiomatic for the customer’s locale, the system does not replace it with another regional synonym. Regional context influences how queries are understood without forcing unnecessary changes to correctly-spelled terms.

Working with query expansion

Typo tolerance works alongside Query Expansion as part of the broader query understanding system. When a typo is corrected or an acronym is expanded, the corrected query may then be further expanded with synonyms and related terms to improve search results. For example, if a customer searches for “lbd”, the system first expands this to “little black dress”. It may then further expand to include related terms like “black cocktail dress” or “black evening dress”. This combination of correction and expansion ensures customers find what they’re looking for even when their initial query is abbreviated or misspelled.

Transparency in search results

When typo correction is applied, the search response includes information about what corrections were made. This allows your storefront to optionally display messages like “Showing results for ‘espresso machine’” when the original query was “espreso machine”, helping customers understand why they’re seeing certain results. For details on accessing this information in API responses, see the Search API documentation.

See also