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

Fix autocomplete value suggestions to exclude tiers #176355

Merged
merged 8 commits into from Feb 21, 2024

Conversation

lukasolson
Copy link
Member

@lukasolson lukasolson commented Feb 6, 2024

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.

@lukasolson lukasolson added Feature:Filters release_note:fix Feature:KQL KQL Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) v8.13.0 labels Feb 6, 2024
@lukasolson lukasolson self-assigned this Feb 6, 2024
@lukasolson
Copy link
Member Author

/ci

@lukasolson
Copy link
Member Author

/ci

@lukasolson
Copy link
Member Author

/ci

@lukasolson lukasolson marked this pull request as ready for review February 8, 2024 15:26
@lukasolson lukasolson requested a review from a team as a code owner February 8, 2024 15:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@stratoula
Copy link
Contributor

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?

@stratoula stratoula requested a review from a team February 9, 2024 06:49
Copy link
Contributor

@davismcphee davismcphee left a 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 👍

Copy link
Contributor

@stratoula stratoula left a 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

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #83 / discover/group1 discover test query #2, which has an empty time range should show matches when time range is expanded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @lukasolson

@lukasolson lukasolson merged commit 534c337 into elastic:main Feb 21, 2024
18 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 21, 2024
## 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)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.13

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 21, 2024
…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>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
## 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Filters Feature:KQL KQL release_note:fix Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) v8.13.0 v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autocomplete value suggestions do not work when an index's _tier_preference is unset
7 participants