Retrieving managed attributes that have refinements

The first step in displaying refinements is to retrieve those managed attributes that potentially have refinements.

Types of refinements

Refinement attributes contain attribute values for the current data store, including both standard refinements and implicit refinements.
  • Standard refinements refine the result set when selected.
  • Implicit refinements are managed attribute values that are assigned to all records in the current result set and whose selection, therefore, does not narrow the results.

Retrieving standard and implicit refinements

Refinements (both standard and implicit) are returned in a NavigationMenu content element, that in turn contains aNavigationMenuItemGroup element with NavigationMenuItem elements for each managed attribute with refinements.

This example shows the NavigationMenuItem element for the managed attribute:
<cs:NavigationMenuItem 
    Name="WineType" 
    Display Name="Wine Type"
    MultiSelect="Or" HasMore="false">
    <cs:ExposureControl Exposed="true">
     <cs:Operator 
      OwnerId="NavMenu" xsi:type="cs:RefinementHideOperator" 
      Name="Perfect" 
      Spec="/"
      Group="Wine Characteristics"/>
    </cs:ExposureControl>
    <cs:Refinement Name="Red" Spec="/Red" Label="Red" Count="40">
      <cs:Operator xsi:type="cs:RefinementOperator" Name="Red" Spec="/Red"/>
    </cs:Refinement>
    <cs:Refinement Name="White" Spec="/White" Label="White" Count="50">
      <cs:Operator xsi:type="cs:RefinementOperator" Name="White" Spec="/White"/>
    </cs:Refinement>
   <cs:RootDimensionValue DimensionName="Sparkling" Spec="/"/>
</cs:NavigationMenuItem>
Each refinement is returned in a Refinement element, as shown in this example for the Red managed attribute value:
<cs:Refinement Name="Red" Spec="/Red" Label="Red" Count="18">
   <cs:Operator xsi:type="cs:RefinementOperator" Name="Red" Spec="/Red"/>
</cs:Refinement>

The Count element indicates that eighteen records would be in the result set if you were to refine on this attribute value.