Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ES|QL] Sort returns a bug when the table has unsupportef fields #100048

Closed
stratoula opened this issue Sep 29, 2023 · 3 comments · Fixed by #100656
Closed

[ES|QL] Sort returns a bug when the table has unsupportef fields #100048

stratoula opened this issue Sep 29, 2023 · 3 comments · Fixed by #100656
Assignees
Labels
:Analytics/ES|QL AKA ESQL >bug Team:QL (Deprecated) Meta label for query languages team

Comments

@stratoula
Copy link

Elasticsearch Version

main

Installed Plugins

No response

Java Version

bundled

OS Version

Darwin

Problem Description

Sorting fails sometimes with the error

No TopN sorting encoder for type UNSUPPORTED

Steps to Reproduce

Playing with ES|QL I tried to run the following query

from logstash-* | sort extension.keyword

This returns the error

No TopN sorting encoder for type UNSUPPORTED

If I run the query:

from logstash-* | keep extension.keyword | sort extension.keyword

the data return successfully.

Logs (if relevant)

No response

@stratoula stratoula added >bug needs:triage Requires assignment of a team area label :Analytics/ES|QL AKA ESQL Team:QL (Deprecated) Meta label for query languages team labels Sep 29, 2023
@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Sep 29, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL)

@astefan
Copy link
Contributor

astefan commented Sep 29, 2023

The simplest mapping that generates this error is

{"mappings": {
    "properties": {
        "extension": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "geo": {
          "properties": {
            "coordinates": {
              "type": "geo_point"
            },
            "dest": {
              "type": "keyword"
            },
            "src": {
              "type": "keyword"
            },
            "srcdest": {
              "type": "keyword"
            }
          }
        }
      }
}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >bug Team:QL (Deprecated) Meta label for query languages team
Projects
None yet
3 participants