Skip to content

[Search] The csv_searchsource export type requests all the fields when just a few are needed  #123187

@dokmic

Description

@dokmic

The original issue popped up in the reporting for CSV export type.

The current implementation of the CSV generator is reusing the request body of the search source. The body always contains stored_fields: ['*'] and a field with * in fields. That is causing the excessive gathering of all the available fields even though they are not exported.

That problem significantly slows down the CSV generation on large datasets and increases memory consumption by the reporting.

In the stored_fields documentation, it is recommended to load those fields selectively.

Should we fix that in the search_source object to return a request body from getSearchRequestBody to fetch only selected fields? Namely:

  • Can we remove { field: '*' } from the fields?
  • Can we provide a stored_fields value different from ['*']?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:Reporting:CSVReporting issues pertaining to CSV file exportbugFixes for quality problems that affect the customer experienceimpact:mediumAddressing this issue will have a medium level of impact on the quality/strength of our product.loe:mediumMedium Level of Effortneeds-teamIssues missing a team labeltriage_neededzDeprecated Feature:ReportingUse Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions