Query-time sort ordering

On a per-query basis, you can specify a key on which to sort the records and a sort direction.

You can add a Sort type to a RecordListConfig configuration that lets you specify a key to sort on and the sort direction. The Sort format is:
<Sort Key="keyName" Direction="dirOrder"/>
where:
  • keyName is the name of a standard or managed attribute based on which sorting is performed.
  • dirOrder is either Ascending for an ascending order, or Descending for a descending order.

Note that the attribute name and the sort order are both case sensitive.

The following example shows how to specify a sort order:
<soapenv:Envelope 
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <Request xmlns="http://www.endeca.com/MDEX/conversation/3/0">
         <Language>en</Language>
         <State>
            <Name>AllRecs</Name>
            <RecordKind>data</RecordKind>
         </State>
         <RecordListConfig Id="RecordList" MaxPages="20">
            <StateName>AllRecs</StateName>
            <RecordsPerPage>10</RecordsPerPage>
            <Page>1</ns:Page>
            <Sort Key="ModelName" Direction="Ascending"/>
         </RecordListConfig>
      </Request>
   </soapenv:Body>
</soapenv:Envelope>

The example specifies an ascending sort order based on the ModelName attribute.