Making product variations and variation attributes searchable
Key Takeaway
To let search text match variation attributes, add them as searchable fields and then rebuild the search index. Adding them as search filters makes them facets, but it doesn't make them searchable. Each page's Results component is independent, so set up the Category Detail page as well as the Search Results page.
In a B2B store, buyers find products through store search. Product variations are child products of a parent product. You set up search so that buyers can discover these variations and their variation attributes. The setup has four parts: searchable fields, search filters, a Variation Attributes field on the results layout, and a rebuild of the search index. A separate setting controls how variation results display. Options in Experience Builder control how buyers move from a parent product to its variations.
Four parts of the setup
Making product variations and variation attributes searchable takes four steps, in this order:
- Add the attributes as searchable fields.
- Add the attributes as search filters.
- Add the "Variation Attributes" field to the results layout in Experience Builder.
- Rebuild the store's search index.
Searchable fields and search filters do different jobs, so you set up both.
| Searchable fields | Search filters | |
|---|---|---|
| What it does | Decides what goes into search indexing | Shows the attribute as a facet on search results pages and category pages |
| If you skip it | The attribute isn't in search indexing | No facet appears for the attribute |
Adding an attribute as a search filter makes it a facet. However, the filter doesn't add the attribute to search indexing, because searchable fields decide what goes there. So a buyer's search text can't match an attribute that is set up only as a search filter. To make the attribute searchable, add it as a searchable field and then rebuild the search index.
A store sells work gloves. Each glove model is a parent product, and its variations differ by a Grip Coating attribute with values such as Nitrile and Latex. The admin adds Grip Coating as a searchable field and as a search filter, and then rebuilds the search index. Because of the searchable field, a buyer who types "nitrile" in the search bar gets results that match on Grip Coating. Because of the search filter, a Grip Coating facet appears on search results pages and category pages. A buyer browsing gloves can use the facet to narrow the list to the latex ones.