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

Truncate long fields in Discover server-side #3475

Open
tarmacmonsterg opened this issue Feb 21, 2023 · 3 comments
Open

Truncate long fields in Discover server-side #3475

tarmacmonsterg opened this issue Feb 21, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request needs more info Requires more information from poster

Comments

@tarmacmonsterg
Copy link

Currenty Discover loads all fields not filtered via the index pattern field filters. This can become problematic if some fields contain very large data that users are not (yet) aware of, thus they might not have had a chance to filter it out via the index patter field filters. Also there might be the case where just some documents contain really large field values.
If such fields fall into the filter and they are displayed (for example, a log larger than a few megabytes), the browser starts to slow down at the time of download and, subsequently, at the time of output.
Is there any possibility, I propose to limit the size of the displayed field to some reasonable size that would not disrupt normal operation.

A similar challenge is available in Kibana, as well as discussions: elastic/kibana#98497

@tarmacmonsterg tarmacmonsterg added the enhancement New feature or request label Feb 21, 2023
@ashwin-pc ashwin-pc self-assigned this Feb 21, 2023
@ashwin-pc
Copy link
Member

@tarmacmonsterg thanks for opening this issue. I'm finding it a little difficult to understand the issue that you are facing here. Can you describe your problem in a little more detail or steps to reproduce your problem?

Heres what happens on the discover page today.

  1. On page load, we have a request to retrieve the list of index patterns available
  2. We also have a request to fetch all the fields available for a selected index pattern
  3. Finally we have a third request to fetch the aggregation response for the timerange selected

Of the 3 requests, the third one is likely the largest and the solution you have proposed would not fix that since it addresses the second request.

@ashwin-pc ashwin-pc added needs more info Requires more information from poster and removed untriaged labels Feb 24, 2023
@tarmacmonsterg
Copy link
Author

tarmacmonsterg commented Mar 17, 2023

@ashwin-pc The main problem is that a large log message (including more than 10 MB) can get into one entry. When I search, I can get a lot of similar messages. For example, if 10 messages of 10MB in size fall into the search criteria, the browser starts to slow down very much if the field with this message is visible. If the field with the message is hidden, then this data is not loaded, so the work is stable. The only thing that helped to somehow get around the problem was to hide the field with the message, and after that, one by one, open it and read it.

@ashwin-pc
Copy link
Member

@tarmacmonsterg sorry for taking a while to get back to this. I get your point. So the query in discover is actually a request to the opensearch cluster directly. I think this issue meed to be move to the OpenSearch repo since they will need to add a provision in the search api to truncate field values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs more info Requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants