Skip to content

ES|QL: MV_SLICE "start offset is greater than end offset" when using -1 #125039

Open
@KyleOnK8s

Description

@KyleOnK8s

Elasticsearch Version

8.17.1

Installed Plugins

No response

Java Version

bundled

OS Version

Cloud

Problem Description

| EVAL list = MV_SLICE(data, 1, -1) will return the error "Start offset is greater than end offset". The documentation says that -1 should be used to get all items in the list but this does not work. I used | EVAL list = MV_SLICE(data, 1, MV_COUNT(data)) as a workaround.

Steps to Reproduce

  1. Switch to ES|QL editor
  2. Find a multi-value field.
  3. Use MV_SLICE to reference a field and then -1 to reference "the rest of the fields".

Logs (if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions