Enabling the refinement order at query time

The OrderByRecordCount attribute sets the refinement order at query time.

Setting the OrderByRecordCount attribute to true in the RefinementConfig element sets the order in which refinements will be displayed, at query time, as in this example:
<Request xmlns="http://www.endeca.com/MDEX/conversation/3/0">
   <State/>
   <NavigationMenuConfig Id="NavigationMenu"
      <RefinementGroupConfig Name="WineCharacteristics" Expose="true">
        <RefinementConfig
          Name="WineType" 
          Expose="true" 
          OrderByRecordCount="true" 
          MaximumCount="100" /> 
      </RefinementGroupConfig>
   </NavigationMenuConfig>
</Request>

This setting overrides the setting (either lexical or record-count) for refinement order that you can specify in the system-navigation_Sorting in the PDR for a refinement.

Refinement order for managed attribute values

When you create a managed attribute value, you can optionally specify a static rank, which ranks the managed attribute values within each managed attribute's hierarchy. The two tables below show how the rank value (if it exists) affects the resulting refinement order.

For unranked managed attribute values, the refinement order is as follows:
OrderByRecordCount setting system-navigation_Sorting setting Resulting sort order used
true lexical record-count
true record-count record-count
false lexical lexical
false record-count lexical
not used in RefinementConfig lexical lexical
not used in RefinementConfig record-count record-count
For ranked managed attribute values, the refinement order is as follows:
OrderByRecordCount setting system-navigation_Sorting setting Resulting sort order used
true lexical record-count
true record-count record-count
false lexical rank value
false record-count rank value
not used in RefinementConfig lexical rank value
not used in RefinementConfig record-count record-count