For managed attribute groups (which are groups of those attributes that contain hierarchy), you can request hierarchy information about a refinement with the ReturnFullPath attribute. In addition, for managed attribute values, hierarchy information is returned with DimensionHierarchy and DimensionValueWithPath types in any record list request.
ProductCategory > CAT_COMPONENTS > BrakesRefinement values, in this case specific components, may still exist for the Brakes refinement to refine the query even further.
ReturnFullPath | Specifies whether to return the full path
of hierarchical refinements with the response. This setting is relevant in
navigation queries for refinements and breadcrumbs.
If set to true, the returned refinement contains the full path to its parent refinement values, as in ProductCategory > CAT_COMPONENTS > Brakes. If set to false, returns only the refinement, without the path to its ancestors. The default is false. |
<ContentElementConfig xsi:type="NavigationMenuConfig" Id="NavigationMenu" HandlerFunction="NavigationMenuHandler" HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ReturnFullPath="true"> <RefinementGroupConfig Name="Product Categories" Expose="true"> <RefinementConfig Name="CAT_COMPONENTS" Expose="true" MaximumCount="3"/> </RefinementGroupConfig> </ContentElementConfig>
For a flat managed attribute with no hierarchy, the refinement parent will always be the attribute root, because there would be no further refinements if a value had already been selected for the attribute.
Refinements for a given managed attribute can only be returned from the Oracle Endeca Server on the same level within the attribute. For example, the Oracle Endeca Server could never return a list of refinement choices that included a mix of countries, states, and regions. In all cases where hierarchy is explicitly defined for an attribute, only refinements on an equal level of hierarchy will be returned for a given query.
<Request xmlns="http://www.endeca.com/MDEX/conversation/1/0"> <State> <SelectedRefinementFilter Name="WineType" Spec="/Red"/> </State> <ContentElementConfig xsi:type="NavigationMenuConfig" Id="NavigationMenu" HandlerFunction="NavigationMenuHandler" HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ReturnFullPath="true"> <RefinementGroupConfig Name="Product Categories" Expose="true"> <RefinementConfig Name="CAT_COMPONENTS" Expose="true" MaximumCount="3"/> </RefinementGroupConfig> </ContentElementConfig> </Request>
The response returns a list of hierarchical refinements. It contains the attribute group information, and all the attributes from this group.
To retrieve hierarchy information on managed attribute values, you can use a query that requests a record list, with the RecordListConfig type that is part of ContentElementConfig.
<ns:ContentElementConfig xsi:type="ns:RecordListConfig" Id="RecordList" HandlerFunction="RecordListHandler" HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" MaxPages="60"> <ns:Column>ProductCategory</ns:Column> <ns:RecordsPerPage>200</ns:RecordsPerPage> <ns:Page>2</ns:Page> <ns:Sort Key="Description" Direction="Ascending"/> </ns:ContentElementConfig>
<cs:DimensionHierarchy> <cs:DimensionValueWithPath> <cs:DimensionValue DimensionName="ProductCategory" Spec="4">Handlebars</cs:DimensionValue> <cs:DimensionValue DimensionName="ProductCategory" Spec="CAT_COMPONENTS">Components</cs:DimensionValue> <cs:DimensionValue DimensionName="ProductCategory" Spec="/">ProductCategory</cs:DimensionValue> </cs:DimensionValueWithPath> <cs:DimensionValueWithPath> <cs:DimensionValue DimensionName="ProductCategory" Spec="6">Brakes</cs:DimensionValue> <cs:DimensionValue DimensionName="ProductCategory" Spec="CAT_COMPONENTS">Components</cs:DimensionValue> <cs:DimensionValue DimensionName="ProductCategory" Spec="/">ProductCategory</cs:DimensionValue> </cs:DimensionValueWithPath> </cs:DimensionHierarchy>