Loading TOC...

WordsSearch.slice

WordsSearch.slice(
   $start as integer,
   $end as integer
) as WordsSearch

Summary

Specify a positional subset of words to retrieve. If unspecified, the slice defaults to the first 10 words.

Parameters
$start The zero-based index of the first word to return.
$end The zero-based index of the word after the last word to return. If unspecified, the end defaults to specify a subsequence of 10 words.

See Also

Example


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"]
*/
   

Comments

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