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

expression universal filtering approach #111422

Closed
ppisljar opened this issue Sep 7, 2021 · 1 comment
Closed

expression universal filtering approach #111422

ppisljar opened this issue Sep 7, 2021 · 1 comment
Labels
Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:large Large Level of Effort

Comments

@ppisljar
Copy link
Member

ppisljar commented Sep 7, 2021

Expressions are currently consumed from 1. visualizations and lens which use Filter Bar, filterManager and 2. canvas where filterbar is not used and filtering is taking a different approach.

All expression consumers should implement filtering in the following manner:

  • panels (renderers) or other components emit an UI action with kibana Filter[] structure
    (possibly they emit other actions which result in a chain of actions being executed where the final result is filter)
  • UI action executes and adds filters to filterManager
  • application passes filters from filterManager to expressions as part of SearchContext
  • kibana function reads from SearchContext and outputs it
  • kibana_context add additional filters,queries etc to the input
  • remove_filter and select_filter functions allow further subselection of filters by group or owner
  • data fetching functions inside expressions can use that kibana Filter[] structure (passed as input) to generate queries

Specific renderers can decide to look just at a group of filters:
kibana_context | select_filters group=mygroup | essql .... | table

We can have some renderers not being affected by the filters they generate:
kibana_context | remove_filters owner=mycontrol | essql | table id=mycontrol

We can have multiple renderers being dependent on each other (parent/child relationship)
panel 1 (parent): kibana_context | remove_filters owner=mycontrol1 owner=mycontrol2 | essql | table id=mycontrol1
panel 2 (child): kibana_context | remove_filters owner=mycontrol2 | essql | table id=mycontrol2

We can have a renderer with multiple datasets provided
group_control panel={group_panel id=mycontrol1 data={kibana_context | remove_filters owner=mycontrol1 owner=mycontrol2 | essql | table id=mycontrol1} panel={group_panel id=mycontrol2 data={kibana_context | remove_filters owner=mycontrol2 | essql | table id=mycontrol2}

@ppisljar ppisljar added Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Team:AppServices labels Sep 7, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Sep 10, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:large Large Level of Effort and removed loe:small Small Level of Effort labels Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:large Large Level of Effort
Projects
None yet
Development

No branches or pull requests

2 participants