Skip to content

KQL removes leading zero and breaks query #62217

@cawoodm

Description

@cawoodm

Kibana version: 7.6.1
Elasticsearch version: 7.6.1
Server OS version: Windows 2012R2
Browser version: Chrome 80
Browser OS version: Windows 10

Original install method (e.g. download page, yum, from source, etc.): Download

Describe the bug:
KQL seems to silently remove leading zeros causing queries to fail.

When querying "customer: 00123" with Lucene we get results but KQL removes the leading zeros:
image
image

"filter":[{"bool":{"should":[{"match":{"customer":12282650}}]...

Lucene Query generates:
image

{"bool":{"must":[{"query_string":{"query":"customer: 0012282650","analyze_wildcard":true,"time_zone"...

Field type customer is keyword.

Metadata

Metadata

Assignees

Labels

Feature:KQLKQLbugFixes for quality problems that affect the customer experience

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions