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.

Filtered search results

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.

NOTE
If you define a product category as a facet, the facet displays the url_path of the category and the subcategory.
Category facet

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.

Setting
Description
Category display settings
Anchor - Yes
Attribute properties
Catalog Input type - Yes/No, Dropdown, Multiple Select, Price, Visual swatch (widget only), Text swatch (widget only)
Attribute storefront properties
Use in Search Results Layered Navigation - Yes

Facet 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).

  • categories aggregation - Aggregates categories, then applies the color and price filters, but not the categories filter.
  • color aggregation - Aggregates color, then applies the price and categories filters, but not the color filter.
  • price aggregation - Aggregates price, then applies the color and categories filters, but not the price filter.
recommendation-more-help
8eedb3c4-09d2-4e4f-917b-524833fc6b4f