A facet is a search refinement element that corresponds to a property of a commerce item type. The property is referred to as a faceting property. The values of this property are broken down into selections that can be either ranges or specific values. For example, you might define a price facet whose faceting property is the salePrice
property of a product’s SKUs. (Facets are always used to group products, but the faceting property can be a property of a related commerce item type, such as the product’s parent categories or child SKUs.) The selection ranges, which can either be determined dynamically or specified explicitly when you create the facet in ATG Merchandising, might be $100 to $200, $200 to $500, $500 to $1000, etc. Or you might define a manufacturer facet with selection values of Acme, Cogswell, and Spacely.
The selection values are displayed on site pages as hyperlinks. When a user clicks one of these links, a query is issued to ATG Search, using the selection range or value as a refinement criterion. For example, if the customer clicks the “$100 to $200” link, the query issued would be something like “return all products whose sale price is between $100 and $200.” The results of this query are then displayed on the page.
There are three main aspects of ATG’s dynamic navigation functionality:
Defining the facets. You specify facets and the logic for determining the selections in ATG Merchandising as part of creating your product catalog. Each facet corresponds to a property of a commerce item, and can be associated with one or more categories or custom catalogs. Each facet is stored in the
RefinementRepository
as a separaterefineElement
repository item. When you deploy your catalog to your production site, theRefinementRepository
is deployed as well.Generating the refinement configuration (
refineConfig.xml
) files. These are the files used in ATG Search to specify the refinement criteria that the facets represent. The ATG platform generates the refinement configuration files when the XHTML documents representing catalog repository items are submitted to ATG Search. Before the documents are submitted, a process is initiated that steps through the catalog hierarchy and, based on the associated refinement elements, generates the complete set ofrefineConfig.xml
files required, and submits these files to ATG Search.Displaying the selections in pages. This is enabled by creating pages containing servlet beans that display the facet selections as hyperlinks. Based on the selections the customer chooses, queries are issued to ATG Search and the results are displayed on the page. The results include only those items whose faceting property value is the selected value or falls within the selected range.
The first aspect, creating the facets, is discussed in the ATG Merchandising User Guide. The other two aspects are described in this chapter.