Skip to main content
Business-to-business (B2B) buyers often search with exact product identifiers, such as stock keeping units (SKUs), part numbers, or their own references. This guide shows how to configure Algolia so that these searches match precisely.

Turn off typo tolerance for SKUs

Store SKUs and other product identifiers as strings, and make those attributes searchable. By default, Algolia enables typo tolerance for numeric search terms. That’s helpful when you don’t need numbers to match exactly, for example, when searching for product variants or physical sizes. To prevent typo matches in SKUs, add your SKU attribute to disableTypoToleranceOnAttributes. This turns off typo tolerance for the SKU attribute. Products can still match a SKU prefix or another searchable attribute. For example, searching for 123 can match 123456.

Search in hyphenated attributes

By default, Algolia regards hyphens as separators, so that searching for 123-X-456 and 123 X 456 returns the same results. To support searches for numbers without spaces, for example, 123X456, index that format alongside 123-X-456. For more information, see Include all possible formats.

Detect search intent with Rules

Use Algolia Rules to detect keywords in a and adjust the search. For example, remove “article” from a query and restrict the search to selected attributes. For more information, see:

Search by custom product aliases

B2B buyers often return to buy the same products. Typing or copying SKUs or other lengthy product identifiers every time can be tedious and error-prone. Some ecommerce platforms allow buyers to save a custom alias, or reference, for an item. Use Algolia Rules to let buyers search by their custom aliases. For example, a buyer saves my_product as an alias for the SKU 123-456-789. If a search contains my_product and includes user_123 in ruleContexts, the rule replaces the alias with the SKU in the search query.
JavaScript
To apply this buyer’s rule, include user_123 in the ruleContexts parameter when searching with an API client:
For more information, see:
Last modified on September 28, 2026