MarkLogic 10 Product Documentation
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


const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.tuples(['author', 'format'])
  .orderBy('item','descending');
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy