As a customer navigates the catalog, ATG Store displays facet values on the left side of the page. The facets available depend on the current category, which is specified in the facet trail using the Category facet. The Size, Color, and Price facets are global, while the Features facet is available only when the customer browses the Women’s Apparel category and its subcategories. (Note that even though Size and Color are global, they don’t display for some categories, such as Home Store and its subcategories, because the size and color properties of the SKUs in those categories are null.)

ATG Search determines which facets to return based on the facet trail submitted with the faceted search request. When a customer enters a free-text search query, a new facet trail is created containing the SRCH facet. So, for example, if the customer searches for “feather,” the facet trail would be:

SRCH:feather

ATG Search returns results from the free-text search and displays the facets associated with the lowest-level ancestor category that is common to all of the returned items. (“Lowest-level” means furthest from the root category, which is considered the top of the catalog hierarchy.) This behavior is enabled by the following properties of the QueryRequest component:

refineConfig=$map
refineConfigMapProperty=ancestorCategories.catalogSpecificId

Setting the refineConfig property to $map instructs ATG Search to select the refinement configuration by finding a metadata property value common to all of the results; refineConfigMapProperty specifies which metadata property to use.

So, for example, if a customer searches for “skirt,” the Features facet is included, because all of the results are in Women’s Apparel. But if the customer searches for “belt,” the Features facet does not appear, because the results include items that are not in Women’s Apparel.

As the customer makes facet selections, they are appended to the facet trail, so that the results returned are only those products that satisfy both the text query and the facet selections. So, if the customer searches for “skirt” and then selects the Black value for the Color facet, the facet trail looks something like this:

SRCH:skirt:1002:Black

The facet trail is reset if the customer uses category navigation (e.g., selects Home Store -> Tables from the category bar near the top of the page), or enters a new free-text search.

 
loading table of contents...