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

[Meta] Field capabilities improvements #147484

Closed
3 of 4 tasks
thomasneirynck opened this issue Dec 13, 2022 · 2 comments
Closed
3 of 4 tasks

[Meta] Field capabilities improvements #147484

thomasneirynck opened this issue Dec 13, 2022 · 2 comments
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated Meta Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@thomasneirynck
Copy link
Contributor

thomasneirynck commented Dec 13, 2022

Data-views (and associated utility clients) are the main client to retrieve field-information for index-patterns.

Given that the number of fields can be quite large, and the frequency with which these functions are called, there is a big motivation to improve how and when they're being called.

Low-level improvements:

  • use stream based parsing of field-docs.
    • Given that responses can be quite large (order of 10s of megabytes), using JSON.parse to construct a JS-object can cause UX-locking. Instead, consider using stream-based parsing.
    • A similar approach has been taken for file-upload (e.g. csv or geojson) to handle large documents.
  • cache field-caps responses, so they are only fetched once to support multi-user
    • (field-level security may complicate this, but this is an opt-in feature, and not the prime use-case)

Data-view API refinement:

  • Add field-level filtering
    • the current APIs fetches all fields. A lot of the usage of DataViews does not require all fields. An example would be a Lens-visualization configured to only fetch data based on a few fields.
    • IDataView should provide methods to load partial field-lists. This would use the fields-param from https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html
    • This can be especially important in Dashboard use-cases, because there the user is not presented with field-lists at all. They just expect the chart to work.

UX polish

  • Improve the perceived performance in client apps by not blocking the bootstrap of the entire UX until field-list is available
    • (use of field-list building block may alleviate the need for this)
@thomasneirynck thomasneirynck added the Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. label Dec 13, 2022
@elasticmachine
Copy link
Contributor

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

@kertal kertal added the Meta label Dec 14, 2022
@kertal kertal added Feature:Data Views Data Views code and UI - index patterns before 8.0 impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Dec 29, 2022
@davismcphee davismcphee added the loe:needs-research This issue requires some research before it can be worked on or estimated label Sep 8, 2023
@mattkime
Copy link
Contributor

Closing this issue since DataViewLazy has been implemented here - #173948

The main item not addressed is using stream based parsing of field-docs. Its unclear that would be beneficial as the main field caps slowdown is the collation of responses from different nodes and clusters - and this is nicely improved by requesting fewer fields. Anyway, feel free to reopen or build off this issue if you see benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated Meta Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

No branches or pull requests

5 participants