Scenario
A bracketed facet is defined, for example, on the price attribute with the following ranges:
- 0-10
- 10-100
- 100-1000
- >1000
The price attribute is of type float, and the facet is configured with lateral (stay) behavior. The facet is configured as below (FAS version 22.2.0):
What is lateral behavior?
Lateral behavior is a feature that defines whether a facet stays available after a selection on it has been made (usually to allow navigational side-steps).
Which are the possible states of a bracketed facet?
-
Regular (drill down)
In this state, a selection acts as an additional criterion. After selecting, only the remaining options with a non-zero number of results are shown. The facet is displayed if at least k options are available in the current result set, where k is the number of values configured in the facet's display conditions. -
Lateral (side step)
In the lateral state, all options matching the prior selection are shown. A lateral facet is only shown when one of its options has been selected. The XML displays the filter selection with the attribute selected="true".
|
The regular and lateral states are not mutually exclusive. A facet is returned for each state in case of overlapping ranges.
|
Expected state when performing a selection on an existing option
If a selection, which matches one of the existing options, is performed and the facet is configured with lateral behavior, then the facet is returned in the lateral state. For example, when fh_location=//catalog01/en_GB/0.0<price<10.0, the preview pages (breadcrumb and facet) and XML display the following:
|
|
<filter on="price" facetid="facet_14" basetype="float" show_number_values="4" selected="true"> <title>Price</title> <filtersection nr="2313" selected="true"> <link > <name>£0 - £10</name> <url-params>.....</url-params> </link> <value>0.0<price<10.0</value> </filtersection> <filtersection nr="13769" > <link > <name>£10 - £100</name> <url-params>.....</url-params> </link> <value>10.0<price<100.0</value> </filtersection> <filtersection nr="1712" > <link > <name>£100 - £1000</name> <url-params>.....</url-params> </link> <value>100.0<price<1000.0</value> </filtersection> <filtersection nr="5" > <link > <name>£1000 or more</name> <url-params>.....</url-params> </link> <value>price>1000.0</value> </filtersection> <url-params-base>......</url-params-base> </filter> |
Expected state when performing a selection which does not match an existing option
If a selection is performed, which does not exactly match an existing option, then the facet is returned to a regular state. For example, when fh_location=//catalog01/en_GB/0.0<price<100.0, the breadcrumb and facet are displayed as below:
|
|
<filter on="price" facetid="facet_14" basetype="float" show_number_values="2"> <title>Price</title> <filtersection nr="2313" > <link > <name>£0 - £10</name> <url-params>.....</url-params> </link> <value>0.0<price<10.0</value> </filtersection> <filtersection nr="13769" > <link > <name>£10 - £100</name> <url-params>.....</url-params> </link> <value>10.0<price<100.0</value> </filtersection> <url-params-base>.....</url-params-base> </filter> |
Expected behavior in case of overlapping ranges
|
Consider an additional range from 0 to 100 for the facet defined above, such that the facet ranges are the following:
|
|
When a selection for 0.0<price<100.0 is performed, the conditions for both regular and lateral states are matched. To be more precise, a lateral facet can be displayed because one of the existing options has been chosen (0-100), and a regular facet can be displayed because there are still available options in the result set (0-10 and 10-100) (provided that the number of values configured to display this facet is at most 2).
|
|
<facetmap universe="catalog01"> <filter on="price" facetid="facet_14" basetype="float" show_number_values="5" selected="true">...</filter> <filter on="price" facetid="facet_14" basetype="float" show_number_values="2">...</filter> ..... </facetmap> |
Comments
0 comments
Please sign in to leave a comment.