Loading TOC...

WordsSearch.orderBy

WordsSearch.orderBy(
   $direction as string
) as WordsSearch

Summary

Specifies the sort order for the words.

Parameters
$direction Specifies whether to sort in "ascending" or "descending" order.

See Also

Example


// Find all words in the JSON property named "title". Return
// the results in descending order.
var jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.words('title')
  .orderBy('descending')
  .result()

==> The last 10 words in the lexicon

["Wrath", "Works", "Tom", "The", 
  "Southern", "Sites", "Secret", 
  "Sawyer", "Sacred", "Of"]
   

Comments

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