You can configure dynamic refinement ranking to be used on a per-query basis.
The Oracle Commerce Presentation API lets you configure dynamic refinement ranking to be switched on and off on a per-query, per-dimension basis, including the number and sort order of refinements to return. This control includes the ability to override the dynamic ranking settings in Developer Studio for a given dimension.
A use case for this dynamic refinement configuration feature would be an application that renders refinements as a tag cloud. Such an application may adjust the size of the tag cloud at query time, depending on user preferences or from which page the query originates.
You set the dynamic refinement configuration at the dimension value
level that you want to control. That is, dynamic ranking will be applied to
that dimension value and all its children. For example, assume that you have a
dimension named
Wine_Type
that has three child dimension values,
Red
,
White
, and
Sparkling
, which in turn have two child dimension values
each. The dimension hierarchy would look like this:
You would set the dynamic refinement configurations depending on which level of the hierarchy you want to order and present, for example:
If you set the configuration on the root dimension value (which has the same name and ID as the dimension itself), the refinements in the
Red
,White
, andSparkling
dimension values will be returned.If there are multiple child dimension values, you can set a configuration on only one sibling. In this case, the refinements from the other siblings will not be exposed. For example, if you set a dynamic refinement configuration on the
Red
dimension value, only the refinements of theMerlot
andChianti
dimension values will be returned. The refinements from theWhite
andSparkling
dimension values will be not be shown, even if you explicitly set dynamic refinement configurations for them.
Keep the following items in mind when using this feature:
The settings of the dynamic refinement configuration are not persistent. That is, after the query has been processed by the MDEX Engine, the dynamic ranking settings for the dimension values revert to their Developer Studio settings.
Setting a dynamic refinement configuration will suppress the generation of a "More..." child dimension value (assuming that the "Generate "More..." dimension value" option has been enabled for the dimension). You can determine whether there are more refinements than the ones shown by checking the
DGraph.More
property on the refinements' parent dimension value.The behavior of hidden dimensions is not changed by setting a dynamic refinement configuration on it. That is, the MDEX Engine still will not return the dimension or any of its values as refinement options.
This bullet discusses the interaction of dynamic refinement ranking with collapsible dimensions. By default, the MDEX Engine considers only leaf dimension values for dynamic ranking, removing all intermediate dimension hierarchy from consideration. With this default behavior, when a hierarchical dimension's mid-level values (all except the root and leaf values) are configured as collapsible in Developer Studio, and when the dimension is also set to use dynamic refinement ranking, the dimension collapses and displays only leaf values for all navigation queries. The mid-level dimension values are never displayed regardless of the number of leaf values present in the navigation state.
You can use the
--dynrank_consider_collapsed
flag to force the MDEX Engine to consider intermediate collapsible dimension values as candidates for dynamic ranking.