Loading TOC...

ValuesSearch.orderBy

ValuesSearch.orderBy(
   $sortKey as string,
   $direction as string
) as ValuesSearch

Summary

Specifies the sort order for values.

Parameters
$sortKey Specifies whether to sort on the "item" (that is, the value) or on the "frequency" (that is, the number of occurrences of the value).
$direction Specifies whether to sort in "ascending" or "descending" order.

See Also

Example


const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.values('title')
  .orderBy('frequency', 'descending')
  .result()
   

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy