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

Search text incorrectly recognized as a number #81581

Closed
nesneros opened this issue Oct 26, 2020 · 2 comments · Fixed by #93658
Closed

Search text incorrectly recognized as a number #81581

nesneros opened this issue Oct 26, 2020 · 2 comments · Fixed by #93658
Assignees
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

Comments

@nesneros
Copy link

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:

  1. Add document with text '0A0'
  2. Make full text search with '0A0'

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'.

@majagrubic majagrubic added bug Fixes for quality problems that affect the customer experience Feature:KQL KQL Team:AppArch labels Nov 2, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@majagrubic
Copy link
Contributor

I managed to reproduce this on Cloud instance 7.9.0

@Dosant Dosant added 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 triaged labels Feb 24, 2021
@lukasolson lukasolson self-assigned this Mar 3, 2021
@lukasolson lukasolson added the SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week label Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants