Skip to content

[ES|QL] Provide the ability to have SORT ignore non-alphanumeric characters #128520

@BenB196

Description

@BenB196

Description

Today, when using SORT with strings (keywords) it takes into account non-alphanumeric (punctual) characters (ex: ( or ") and sorts these first.

Example:

ROW example = ["abc", "def", "\"ghij", "(x)yz"]
| MV_EXPAND example
| SORT example

Gets you:

{
  "rawResponse": {
    "columns": [
      {
        "name": "example",
        "type": "keyword"
      }
    ],
    "values": [
      [
        "\"ghij"
      ],
      [
        "(x)yz"
      ],
      [
        "abc"
      ],
      [
        "def"
      ]
    ]
  }
}

In some other systems (ex: Linux ls command), it's possible to ignore these characters and only sort on the alphanumeric values.

It'd be nice to have the ability to configure this within ES|QL.

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