
ValuesSearch.orderBy( sortKey as string, direction as string ) as ValuesSearch
Specifies the sort order for values.
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.values('title')
.orderBy('frequency', 'descending')
.result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.