Loading TOC...

TuplesSearch.orderBy

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

Summary

Specifies the sort method for the tuples.

Parameters
$sortKey Specifies whether to sort on the "item" (that is, the value of each index) or on the "frequency" (that is, the number of occurrences of the combination of values). When sorting on item, the indexes constituting the tuple are sorted in left-to-right order.
$direction Specifies whether to sort in "ascending" or "descending" order.

See Also

Example


var jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.tuples(['author', 'format'])
  .orderBy('item','descending');
   

Comments

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