-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Unified Search] Value autocomplete without field name specified #193608
Comments
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
Ideally we'd also get back a somewhat random set of documents, not necessarily the first 100 as they might have very similar values I.e. look at 1000 docs, randomly sort them, then return 100 of them |
@lukasolson Where you likely have the most autocomplete experience on our team, just wondering if you have any thoughts on this one? There's more context in the latest One Discover sync recording around 25:00. |
Right now, the default method for value suggestions is the Before switching to this API we had many reports of very large clusters being taken down completely solely because of autocomplete - granted we were doing aggregations that required visiting each shard. This might not be the case if we're just doing a simple query and returning the first n documents, but we need to be sure to do extensive testing with large clusters (see #46054, #58749, #12692). Also, what if the first n documents don't contain the specific value you're looking for? This is another common report for value suggestions when we hit the In general I think there are a lot of tweaks to get right in this sort of implementation. Given that we are focusing on ES|QL I would be very hesitant to prioritize this work. |
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
Thanks for the context @lukasolson - I agree that it won't be trivial to get this experience right.
Absolutely, as this will be called all the time in the background, we need to make sure it's fast and not too taxing on the cluster. As you mention, as we only search and don't do aggregations it seems to be possible to shape it in a way that it brings value and still fits the constraints.
I think this was mostly about cases where we show the value suggestions as a list to pick a value from - I agree that the quality of the data won't be good enough for that, but as a suggestion in autocomplete where we don't show any suggestion right now I think it would still bring a lot of value.
The same kind of feature could also be valuable for ESQL - it would just be called in a different context. |
A couple of follow-up questions - is this something only desired for observability, or are you suggesting it be generic & included in the search bar by default? Would we show some sort of message that the suggestions are not all-inclusive to avoid confusion for when the desired value isn't in the matching 100 documents? |
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) |
The value-autocomplete functionality in the unified search bar for KQL is super helpful to search for more complex values like host names and similar:
However, a big downside is that it requires the user to know the field name to get autocomplete - if they only know the prefix of the value they are search for, it will be difficult to search effectively for it. In this case, the flow currently looks like this:
*
This manual process can be automated in the following way:
In case the user types in a string in the KQL bar without specifying a field name, search for
and return the first 100 documents. Within Kibana, search through all fields which have the typed string as a prefix. Use the matched fields as suggestions, suggesting both field name and value to search for. Add them to the regular suggestions in the dropdown, below the regular field suggestions:
CleanShot.2024-09-17.at.15.49.05.mp4
Considerations
Suggestions need to return quickly - while the search on all fields for a small amount of documents is more expensive than looking up regular autocomplete values for a single specified field, in tests with medium sized clusters the response time was still acceptable. Two measures can help:
As these requests would be sent quite often while the user is typing, testing needs to be performed to gauge the additional load this would cause on the cluster. Using strategies like throttling and debouncing, it should be possible to fine tune the feature to balance churn and user experience.
The text was updated successfully, but these errors were encountered: