-
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
[Lens] Field existence via 500 sample is not intuitive #58330
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
Have you thought about some sort of lazy loading where the fields list shows these first 500 documents, but then continues to query the rest adding as it gets more information? |
A couple of other suggestions that came up:
|
Why even pull documents at all? Why not just load the field list from the index pattern saved object? Then, lazy load field details so that when a user hovers over a field for details, a terms aggregation or whatever is used to fetch the field details in a separate request. |
@nreese Because we have the beats problem: metricbeat has 3900 individual fields in the default configuration, and obviously not all of those are used. So we want to provide the best possible list of fields as quickly as possible on first load and as filters are added. |
To cross-link in some of the related discussion over time:
What would the ideal solution to this problem be? Would it require Elasticsearch support? |
I couldn't find a discussion in the ES repo, so I added one elastic/elasticsearch#52730 |
Sampling more documents by default is not recommended. We anyway make multiple queries it wouldn't be good to increase it. The scenario I find the most unsettled is when the preview comes empty and when dropped it shows data, it makes Lens seem unreliable. I understand it is due to sparse data, maybe we should try to optimize only this use case. Regardless, I like @timroes suggestions
|
It sounds like the problem is a result of a design decision to support a large field list that is sparsely populated. I would recommend not optimizing the experience for beats. I think the beats problem needs to be solved upstream of lens and then lens can optimize on just showing available fields in the index pattern and lazy load value details with aggregations to provide a view of the entire data set for a time range as needed vs querying for the first 500 documents and showing values for that poorly chosen sample. |
As discussed with the Elasticsearch team, it might be possible to replace the current approach by either a multisearch or a filters aggregation, kicking off a separate search for the existence of each field. If this is justifiable from a performance and resource usage perspective, it would be a preferred solution because it will provide 100% accurate results (instead of the potential of false negatives as in the current solution). We are going to explore this approach by creating a POC and testing it against common production configurations. |
POC didn't yield an implementation change so we're keeping this open. Need to continue to collaborate with Elasticsearch team on field_caps |
Fixed by #112782 we don't use sampling anymore |
We currently only sample over the first 500 documents within the configured time range and filters (once #52826 is fixed). Those 500 documents might not be very representative over the overall documents matching this filters/queries/timerange, and thus a lot of available fields might be hidden.
We currently see a high amount of confusion among users around fields not appearing because of that. It's the most common question currently raised across all sources (forums, issues, twitter...).
We should discuss how we want to handle that in a less confusing way. I have a couple of suggestions what we could do to improve this situation:
I am not sure if we have better solutions, but I think given how often this issue pops up, we need to think about how we can create a better UX here.
Similar discussion: #40277
cc @cchaos
The text was updated successfully, but these errors were encountered: