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/1/0">
   <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">
      <RefinementGroupConfig Name="Wine Characteristics" Expose="true">
        <RefinementConfig
          Name="WineType" 
          Expose="true" 
          OrderByRecordCount="true" 
          MaximumCount="100" /> 
      </RefinementGroupConfig>
   </ContentElementConfig>
</Request>

This setting overrides the setting for refinement order that you can specify in the system-navigation_Sorting in the PDR for a refinement.