Loading TOC...

ValuesSearch.slice

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

Summary

Specifies a subsequence of values to retrieve. If unspecified, the slice defaults to the first 10 values.

Parameters
start The zero-based index of the first value to return.
end The zero-based index of the value after the last value to return. If unspecified, the end defaults to specify a subsequence of 10 values (start + 10).

See Also

Example


// Return the first 3 values of the 'title' JSON property.
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.values('title')
  .slice(0,3)
  .result()
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.