You can configure and prioritize multiple FAS ranking rules in the Merchandising Studio based on a variety of triggers. We recommend you to create 2 broad rules for search and navigation as default rules and have specific ranking rules with higher priority for your particular targeting needs.
Multiple ranking attributes
FAS allows the use of multiple ranking attributes. The following rules apply:
| Case | 1st attribute | 2nd attribute | 3th attribute |
|---|---|---|---|
| Navigation (only primary universe attributes) | primary tree list/text/int/float/functional attribute | primary tree list/text/int/float/functional attribute | primary tree list/text/int/float/functional attribute |
| Navigation (secondary universe attribute) | relational attribute | Not Supported | Not Supported |
| Search (match rate + primary universe attributes) | _match_rate | primary tree list/text/int/float/functional attribute, _match_rate | primary tree list/text/int/float/functional attribute, _match_rate |
| Search (only primary universe attributes) | primary tree list/text/int/float/functional attribute | primary tree list/text/int/float/functional attribute | primary tree list/text/int/float/functional attribute |
| Search (secondary universe attribute) |
relational attribute
|
Not Supported |
Not Supported
|
Remark: One can sort on any int/float/text attribute A from items in the variants/relational universe. However, if there is not a (default) reference attribute defined in the config, and the given query does not contain any criteria or targets on relational attributes, A would be explicitly used as the reference attribute for selecting variants.
This means even if one sorts on non-reference variants attribute Y, one would only get the lowest Y in the variants if and only if there is not already a (default) reference attribute defined in the config, and if the given query does not contain any criteria or targets on relational attributes. See Section Variant Selection for details on variant selection.
Sorting via URL parameters
You can use URL parameters to override the default sorting behaviour. The URL parameter fh_sort_by take a comma-separated list of sorting attributes. The sort order is by default ascending except when the attribute is prefixed with a minus sign. Examples:
fh_sort_by=color fh_sort_by=size,length fh_sort_by=size,-length fh_sort_by=size,-length,-weight
Notes
- It is recommended to have at least 3 sort attributes. In general there should be sort attributes to have a well-defined sorting on any possible result set.
- Sorting on primary attributes is just supported on single valued attributes: int, float, list, text (not set/set64/categories).
- Sorting on secondary attributes is just supported on single valued attributes: int, float, text.
- When all attributes are equal the items are ordered by their internal itemid as a final last resort. The itemid is normally not visible to the end user, it is assigned to the item while loading.
- When the last sort field was reverse, itemid sorting will also be reversed.
- Please note that one should avoid relying on this, because the order is not understandable to the end user, and on large numbers of items it is also inefficient.
- Also note that at this time itemids are assigned in a monotonically increasing fashion, this is not guaranteed as we will reassign itemids from deleted items at some point in the future.
- With a relational attribute as sort attribute only one sort attribute is possible and that attribute must be the same as the referenced attribute. The default referenced attribute is set in the "System Defaults" in the Merchandising Studio, in the column "Referenced attribute".
- Sorting on related attributes is very much geared to sorting on prices, where typically the lowest values are on the top of the list. Reverting the sort order is supposed to give the same related items, but in reverse order. As a result: reverse sorting (Z-A) will still show the lowest valued related item.
- Sort attributes must always be declared in the live-attribute-types section in the business.xml
- Modified queries will only work if the first sort attribute is _match_rate
- There is no limit on the number of sort attributes, but have more than three is not really recommended for performance reasons.
Variant Selection
In the following cases, default selection should be applied to the given query if exists:
- If the given query defines one or more targets (of the form :a~x or :a%x) on relational attributes, FAS uses such targets for variant selection.
- If the display field list for (navigation/search) lister or campaigns is defined on some relational attributes, FAS constructs a selection target (of the form :a~x) from the reference attribute for variant selection.
- If the display field list for (navigation/search) lister or campaigns is not defined on any secondary attribute, but the given query contains one or more criteria on some relational attributes, FAS constructs a set of targets, each on one of those criteria for variant selection.
- If the display field list for (navigation/search) lister or campaigns is not defined on any secondary attribute, and the query contains no criterion on a relational attribute, but has defined the 1st sorting attribute on a relational attribute, then FAS constructs a selection target based on that relation attribute for variant selection.
- Otherwise, FAS falls back onto primaries, sort by primary attribute, function or index structure.
Sorting on Text Type
FAS sorts text type values according the following order
!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz
therefore the order is: non-alphanumeric, accented alphabet, numerals, alphabet (case insensitive).
Comments
0 comments
Article is closed for comments.