TuplesSearch.slice

TuplesSearch.slice(
   start as integer,
   end as integer
) as TuplesSearch

Summary

Specifies a subset of tuples to retrieve. If unspecified, the slice defaults to the first 10 tuples.

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

See Also

Example


// Return the first 5 co-occurrences.
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.tuples(['author','format','price'])
  .slice(0,5)
  .result()
   

Example


// Return 5 co-occurrences, beginning with the 20th result
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.tuples(['author','format','price'])
  .slice(20,25)
  .result()
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy