-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Fixes KQL autocomplete suggestions with IP fields #154111
Conversation
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome Lukas! Changes LGTM, I tested it locally in Chrome and ip suggestions work like a charm :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great! Thanks, Lukas 👍
const [field] = stubFields.filter( | ||
({ type, aggregatable }) => type === 'string' && aggregatable | ||
({ type, aggregatable }) => (type === 'string' || type === 'ip') && aggregatable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be helpful to also call await getValueSuggestions({...})
separately for a string field and for an ip field then? And check that http.fetch
was called twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 0e2c81f.
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
💚 Build Succeeded
Metrics [docs]Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @lukasolson |
Thank you so much @lukasolson ! Just a comment for future readers: |
Previously we had mapped host ips as keywords as well as ips in order to work around elastic#140266. This has been fixed with elastic#154111 so we can rely on the IP field and remove the duplicate. Relates elastic#154111 Relates elastic#140266
Summary
Resolves #140266.
Fixes KQL autocomplete suggestions when using an IP field. (Only works when the selected value suggestion method is terms_enum, not terms_agg.)
Checklist
Release note
KQL autocomplete suggestions now support IP-type fields when the advanced setting, autocomplete:valueSuggestionMethod, is set to terms_enum.