Back to Elasticsearch

Mv Slice

docs/reference/query-languages/esql/kibana/docs/functions/mv_slice.md

9.4.2646 B
Original Source

% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.

MV SLICE

Returns a subset of the multivalued field using the start and end index values. Indexes are 0-based. This is most useful when reading from a function that emits multivalued columns in a known order like SPLIT or MV_SORT.

esql
row a = [1, 2, 2, 3]
| eval a1 = mv_slice(a, 1), a2 = mv_slice(a, 2, 3)