vec:subvector( $vector as vec:vector, $start as xs:unsignedInt, [$length as xs:unsignedInt?] ) as vec:vector
Returns a subvector of the input vector, starting at the specified index, with the specified length (optional).
xquery version "1.0-ml"; let $vector := vec:vector((3.14,1.59,2.65,3.58,9.79,3.23)) return vec:subvector($vector, 2, 3) => [ 2.65, 3.58, 9.79 ]
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.