Skip to content

ES|QL: KQL() fails on constant_keyword #138778

@quackaplop

Description

@quackaplop

To reproduce:

PUT testesql 
{
  "mappings": {
    "properties": {
      "constant": {
        "type": "constant_keyword"
      }
    }
  }
}

Query:

FROM testesql | WHERE KQL("constant: *f*")

Failure:

{
  "error": {
    "root_cause": [
      {
        "type": "query_shard_exception",
        "reason": "Can only use wildcard queries on keyword, text and wildcard fields - not on [constant] which is of type [constant_keyword]",
        "index_uuid": "-KAN3lROTYSKdSNUK0GdHQ",
        "index": "testesql"
      }
    ],
    "type": "query_shard_exception",
    "reason": "Can only use wildcard queries on keyword, text and wildcard fields - not on [constant] which is of type [constant_keyword]",
    "index_uuid": "-KAN3lROTYSKdSNUK0GdHQ",
    "index": "testesql"
  },
  "status": 400
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions