MarkLogic 12 EA 1 Product Documentation
WordsSearch.sliceWordsSearch.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"]
*/
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.