A facet is a search refinement element that corresponds to a property of a product or SKU. 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. The selection ranges, which can either be determined dynamically or specified explicitly, 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.

You specify facets and the logic for determining the selections in Oracle ATG Web Commerce 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 catalogs. Each facet is stored in the RefinementRepository as a separate refineElement repository item. When you deploy your catalog to your production site, the RefinementRepository is deployed as well. When you index your catalog, the data in the RefinementRepository is used to create the refinement configuration files used by Oracle ATG Web Commerce Search. These are the XML files that define sets of facets and the facet values or ranges. These files are generated and submitted to Search after an indexing operation. When Commerce issues a query to Search, it determines which refinement configuration file should be applied, and specifies it in the query.

When you write JSPs for displaying facets, you render the facet selection values as hyperlinks. When a customer clicks one of these links, a query is issued to Search, using the selection range or value as a refinement criterion. For example, a customer might issue a text query that returns a set of products that are displayed on the page. If the customer then clicks the Sale Price facet’s “$100 to $200” link, a new query is issued that specifies “return only the products in this set whose sale price is between $100 and $200.” The results of this query are then displayed on the page, and the facet selections are updated.

See the ATG Merchandising Guide for Business Users for information about creating facets.