
TuplesSearch.slice( start as integer, end as integer ) as TuplesSearch
Specifies a subset of tuples to retrieve. If unspecified, the slice defaults to the first 10 tuples.
// Return the first 5 co-occurrences.
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.tuples(['author','format','price'])
.slice(0,5)
.result()
// Return 5 co-occurrences, beginning with the 20th result
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.tuples(['author','format','price'])
.slice(20,25)
.result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.