Facets
Faceting is a method of high-performance filtering that uses multiple dimensions of attribute values as search criteria. Faceted search is similar, but considerably “smarter” than the standard layered navigation. The list of available filters is determined by the filterable attributes of products returned in the search results.
Live Search uses the productSearch query, which returns faceting and other data that is specific to Live Search. Refer to productSearch query in the developer documentation for code examples.
Within a facet, shoppers can select multiple options, such as “Basic” and “Snug” under “Style” and the search results update to display only those styles. Likewise, if a shopper selects options across facets, such as “Basic” under “Style” and “Indoor” under “Climate”, the search results update to display that selected style and that selected climate.
Any defined facet may be used as a URL parameter and results will be filtered based on the parameter values: http://yourstore.com?brand=acme&color=red.
Faceting requirements
The category and product attribute requirements for faceting are similar to the filterable attributes used for layered navigation. Each storefront properties of an attribute must have the “Use in Search Results Layered Navigation” value set to “Yes”. You can review and update the attribute configuration from the Stores > Attribute menu in the Admin.
url_path of the category and the subcategory.
See boundaries and limits to learn more about the facet requirements in Live Search.
If you have a large number of attributes to contend with, consider combining attributes into a single ‘meta-attribute’. For example, shoes generally have numeric sizes, while shirts are commonly sized “S/M/L/XL”. These two types of sizes can be combined into a single searchable attribute.
YesYes/No, Dropdown, Multiple Select, Price, Visual swatch (widget only), Text swatch (widget only)YesFacet aggregation
Facet aggregation is performed as follows: if the storefront has three facets (categories, color, and price) and the shopper filters on all three (color = blue, price is from $10.00-50.00, categories = promotions).
categoriesaggregation - Aggregatescategories, then applies thecolorandpricefilters, but not thecategoriesfilter.coloraggregation - Aggregatescolor, then applies thepriceandcategoriesfilters, but not thecolorfilter.priceaggregation - Aggregatesprice, then applies thecolorandcategoriesfilters, but not thepricefilter.