In some situations, you may not want your sites to display all available facets and selections. For example:
If you have a large number of facets, you may want to display only the most important ones.
If a facet has a large number of selection values or ranges, you may not want to display all of them. For example, if a Color facet has 20 values, you could display only the ones with the most results.
If a facet returns only one selection value, you may not want to display that facet. For example, if the value of the
color
property for every result returned isred
, you could suppress display of the Color facet, since it would have only a single selection value that would return the same set of results already being displayed.
You can restrict the set of facets and selection values that Oracle ATG Web Commerce Search returns by setting the following properties on the /atg/commerce/search/catalog/QueryRequest
component:
refineMax
The maximum number of facets to return (configured value: 5). If the number of facets in the refinement configuration is greater than this number, only the topn
facets (whererefineMax=
n
) in terms of priority order are returned. (See Ordering Facets by Priority.) Note that if two or more facets have a nesting relationship, Oracle ATG Web Commerce Search returns only one facet in that nesting hierarchy.
refineTop
The maximum number of values or ranges to return for a facet (configured value: 5). If the number of available values is greater than this number, only the topn
values (whererefineTop=
n
) in terms of sort order are returned. The sort order for a facet’s selection values is specified when the facet is defined in Oracle ATG Web Commerce Merchandising; you can choose to sort in descending order of the number of results in the selection, so that only the facet selections with the fewest results are eliminated.
refineMin
The minimum number of results that a facet value or range must have for that value or range to be returned. The configured value is 0, which means even facet values with no results are returned. For example, if a Size facet has values of Small, Medium, and Large, selections are displayed for all three values, even if the results include no items whose size is Small. Set the value of this property to 1 to return only facet values that include results.
refineMinVal
The minimum number of selection values or ranges that a facet must have in order for that facet to be returned. The default value is 1, which means all facets are returned, since a facet always has at least one selection value or range. Set the value of this property to 2 eliminate facets for which all results have the same value. For example, if every result hascolor=red
, settingrefineMinVal
to 2 prevents Oracle ATG Web Commerce Search from returning the Color facet.