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
Fix autocomplete value suggestions to exclude tiers #176355
Conversation
/ci |
/ci |
/ci |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
This seems fine to me but I have to be honest! I am not familiar with this functionality or code. Maybe someone from the @elastic/kibana-data-discovery team can also review with me? |
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.
Tested locally and confirmed that indices with a null _tier_preference
now always show autocomplete suggestions regardless of the configuration. I also validated that custom unifiedSearch.autocomplete.valueSuggestions.tiers
values are respected, confirming that suggestions are shown for indices whose _tier_preference
are included in the configured value, and that suggestions are not shown for indices whose _tier_preference
are not included in the configured value. Thanks for fixing it! LGTM 👍
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.
If Davis ia happy, I am happy! LGTM
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @lukasolson |
## Summary Resolves elastic#165264. When querying ES for value suggestions (KQL & filter editor), this PR updates the behavior to filter *out* (instead of filter *for*) tiers. This ensures that for those indices without a tier preference set, the values will still show up. The tiers are controlled by a config setting, `data.autocomplete.valueSuggestions.tiers`. This may have already been set, so we preserve the existing settings when querying. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### Release notes Autocomplete value suggestions for KQL and filters will now return suggestions even when the corresponding index has no tier preference set. --------- Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co> Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co> (cherry picked from commit 534c337)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…177504) # Backport This will backport the following commits from `main` to `8.13`: - [Fix autocomplete value suggestions to exclude tiers (#176355)](#176355) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Lukas Olson","email":"lukas@elastic.co"},"sourceCommit":{"committedDate":"2024-02-21T18:28:25Z","message":"Fix autocomplete value suggestions to exclude tiers (#176355)\n\n## Summary\r\n\r\nResolves #165264 querying ES for value suggestions (KQL & filter editor), this PR\r\nupdates the behavior to filter *out* (instead of filter *for*) tiers.\r\nThis ensures that for those indices without a tier preference set, the\r\nvalues will still show up.\r\n\r\nThe tiers are controlled by a config setting,\r\n`data.autocomplete.valueSuggestions.tiers`. This may have already been\r\nset, so we preserve the existing settings when querying.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### Release notes\r\n\r\nAutocomplete value suggestions for KQL and filters will now return\r\nsuggestions even when the corresponding index has no tier preference\r\nset.\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>\r\nCo-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>","sha":"534c3378319b142fb27f7557c91851300e42540d","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Filters","release_note:fix","Feature:KQL","Team:DataDiscovery","v8.13.0","v8.14.0"],"title":"Fix autocomplete value suggestions to exclude tiers","number":176355,"url":"#176355 autocomplete value suggestions to exclude tiers (#176355)\n\n## Summary\r\n\r\nResolves #165264 querying ES for value suggestions (KQL & filter editor), this PR\r\nupdates the behavior to filter *out* (instead of filter *for*) tiers.\r\nThis ensures that for those indices without a tier preference set, the\r\nvalues will still show up.\r\n\r\nThe tiers are controlled by a config setting,\r\n`data.autocomplete.valueSuggestions.tiers`. This may have already been\r\nset, so we preserve the existing settings when querying.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### Release notes\r\n\r\nAutocomplete value suggestions for KQL and filters will now return\r\nsuggestions even when the corresponding index has no tier preference\r\nset.\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>\r\nCo-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>","sha":"534c3378319b142fb27f7557c91851300e42540d"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"#176355 autocomplete value suggestions to exclude tiers (#176355)\n\n## Summary\r\n\r\nResolves #165264 querying ES for value suggestions (KQL & filter editor), this PR\r\nupdates the behavior to filter *out* (instead of filter *for*) tiers.\r\nThis ensures that for those indices without a tier preference set, the\r\nvalues will still show up.\r\n\r\nThe tiers are controlled by a config setting,\r\n`data.autocomplete.valueSuggestions.tiers`. This may have already been\r\nset, so we preserve the existing settings when querying.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### Release notes\r\n\r\nAutocomplete value suggestions for KQL and filters will now return\r\nsuggestions even when the corresponding index has no tier preference\r\nset.\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>\r\nCo-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>","sha":"534c3378319b142fb27f7557c91851300e42540d"}}]}] BACKPORT--> Co-authored-by: Lukas Olson <lukas@elastic.co>
## Summary Resolves elastic#165264. When querying ES for value suggestions (KQL & filter editor), this PR updates the behavior to filter *out* (instead of filter *for*) tiers. This ensures that for those indices without a tier preference set, the values will still show up. The tiers are controlled by a config setting, `data.autocomplete.valueSuggestions.tiers`. This may have already been set, so we preserve the existing settings when querying. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### Release notes Autocomplete value suggestions for KQL and filters will now return suggestions even when the corresponding index has no tier preference set. --------- Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co> Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Summary
Resolves #165264.
When querying ES for value suggestions (KQL & filter editor), this PR updates the behavior to filter out (instead of filter for) tiers. This ensures that for those indices without a tier preference set, the values will still show up.
The tiers are controlled by a config setting,
data.autocomplete.valueSuggestions.tiers
. This may have already been set, so we preserve the existing settings when querying.Checklist
Release notes
Autocomplete value suggestions for KQL and filters will now return suggestions even when the corresponding index has no tier preference set.