Skip to content

KQL still removes leading zero and breaks query in some cases #85548

@kkensy

Description

@kkensy

Kibana version:
7.9.1
Elasticsearch version:
7.9.1
Server OS version:
Ubuntu 16.04.6 LTS
Browser version:
Google Chrome Version 87.0.4280.66 (Official Build) (64-bit)
Browser OS version:
Linux Mint 19.1 Tessa
Original install method (e.g. download page, yum, from source, etc.):
download page
Describe the bug:
As in #62217, there are some cases left, where the leading zero is removed from the query. For example:
the search incMods:{ version:077 } results in a query ...{"match":{"incMods.version":"077"}}...
the search incMods:{ version:070 } results in a query ...{"match":{"incMods.version":70}}...
The field version is mapped as (a lowercased) keyword.

The fix for #62217 introduced a regex, that I think needs to be fixed (^0.0$ should be ^0\.0$):
https://github.com/elastic/kibana/pull/62748/files#diff-90efe212df5748f7d18f7215c19a805fcfdb3150874b41a846eb42d6b4e654e5R250

Metadata

Metadata

Assignees

Labels

Feature:KQLKQLFeature:SearchQuerying infrastructure in KibanaPR sentSharedUX/fix-it-weekBugs that have been groomed and queued up for the team's next fix it weekbugFixes for quality problems that affect the customer experiencetriage_needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions