Search text incorrectly recognized as a number #81581
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:KQL
KQL
impact:medium
Addressing this issue will have a medium level of impact on the quality/strength of our product.
loe:small
Small Level of Effort
PR sent
SharedUX/fix-it-week
Bugs that have been groomed and queued up for the team's next fix it week
Kibana version:
7.9.2
Elasticsearch version:
7.9.2
Server OS version:
Linux
Browser version:
Chrome
Browser OS version:
Linux Ubuntu 20.04
Original install method (e.g. download page, yum, from source, etc.):
ECK
Describe the bug:
When searching for '0A0' (zeros not O's) in the search bar Kibana recognizes it as a number, and it doesn't search for the text '0A0'.
Steps to reproduce:
Expected behavior:
To find the document with text '0A0'
Screenshots (if relevant):
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
Any additional context:
I had a look in the code where Kibana decides if a search input is a String or number and there is an issue with the reg exp in src/plugins/data/common/es_query/kuery/ast/kuery.peg, line 250.
The pattern is '/^(-?[1-9]+\d*([.]\d+)?)$|^(-?0[.]\d*[1-9]+)$|^0$|^0.0$|^[.]\d{1,}$/', there is a part that is supposed to match only the text '0.0', but it will e.g. also match the text '0A0'. The part of the pattern should have been '0[.]0'.
The text was updated successfully, but these errors were encountered: