WordsSearch.slice( start as integer, end as integer ) as WordsSearch
Specify a positional subset of words to retrieve. If unspecified, the slice defaults to the first 10 words.
const jsearch = require('/MarkLogic/jsearch.sjs'); jsearch.words('title') .slice(0,3) .result() /* Result: Return the first 3 words in the lexicon. For example: ["Adventures", "and", "Collected"] */
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.