The first step in displaying refinements is to retrieve those managed attributes that potentially have 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.
<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>
<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.