[ML] Transforms: Filter aggregation support#67591
Conversation
77ab02f to
116a5e4
Compare
a47d189 to
d74e5a2
Compare
hey @qn895 , we considered changing the design (I did a demo during the weekly meeting), but it's out of scope for this PR. Regarding the link to the documentation - we don't have to cover all cases, and I presume the users who deal with transforms are pretty advanced with ES 🙂 |
@qn895 we should not disable the button, because the user might expect some new value which is not presented in the dataset yet. I will remove the red underline that comes from the combobox control |
thanks for spotting it @peteharverson , just pushed the fix 57b75c4 |
|
Tested and LGTM |
|
@elasticmachine merge upstream |
pheyos
left a comment
There was a problem hiding this comment.
Functional test changes LGTM, just left a data-test-subj naming suggestion, but feel free to merge without it.
|
So far we followed the principle that each option available in the groupby/agg-dropdown adds a valid configuration with reasonable defaults without a requirement to edit some form. This was a deliberate choice to allow users to quickly add different aggs by just using the keyboard (search in the dropdown, hit enter, search again, hit enter ...). Can we try to achieve something similar with Another thing is that for items with additional configuration options we try to provide a summary or hint at the custom settings, for example the interval for |
@walterra I believe it is not possible to achieve such behavior with filter agg. There are so many different variations and configs, so we can't predict what will be suitable for the user. Even the basic setup with Regarding naming - @peteharverson proposed to have term value as an agg name, and I think it's quite a good idea because it clearly indicates the filed in result index. Maybe it could be something like |
…into ML-60015-transforms-filter-agg
|
I tested the terms filter and this looks good as you described. I was referring to number based filters like |
walterra
left a comment
There was a problem hiding this comment.
Code LGTM, great work with how we can now compose forms!
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
peteharverson
left a comment
There was a problem hiding this comment.
Tested latest edits and LGTM!
* [ML] WIP filter support * [ML] value selector * [ML] only supported filter aggs as options * [ML] WIP apply config * [ML] fix form persistence * [ML] refactor * [ML] support clone * [ML] validation, get es config * [ML] support "exists", fixes for the term form, validation * [ML] fix ts issues * [ML] don't perform request on adding incomplete agg * [ML] basic range number support * [ML] filter bool agg support * [ML] functional tests * [ML] getAggConfigFromEsAgg tests * [ML] fix unit tests * [ML] agg name update on config change, add unit tests * [ML] update snapshot * [ML] range selector enhancements * [ML] improve types * [ML] update step for range selector to support float numbers * [ML] range validation * [ML] term selector improvements * [ML] fix switch between advanced editor * [ML] prefix test ids * [ML] support helper text for aggs item
* master: (26 commits) [Console]remove completion for type for filter queries and aggs (elastic#68103) [ML] Transforms: Filter aggregation support (elastic#67591) [ES UI Shared] Monaco XJSON (elastic#67485) [Index Management] Add data streams functionality to indices tab (elastic#67940) [Discover] Fix renaming of saved search not displayed in breadcrumb (elastic#67577) [SECURITY] Rename siem plugin to security_solution (elastic#67902) [Uptime] Fix Telemetry Api flaky test (elastic#67358) [Data plugin] Add configuration property to enable / disable autocomplete (elastic#67847) remove scripts. prettire update has been done (elastic#68130) Closes elastic#68055 by detecting the local Kibana version and using that as (elastic#68198) [apm] docs: add deployment annotation example (elastic#67408) [ML] Extend population preview chart to show actual and typical value (elastic#67569) Refactor index management client integration tests for scalability (elastic#67917) Add generator function that creates multiple alerts (elastic#67713) chore(NA): remove config arg from os packages (elastic#67871) [Reporting] Move code out of Legacy (elastic#67904) [Metrics UI] Add overrides to Snapshot API to support alert previews (elastic#68125) [Security] [Cases] Manage timeline UI API (elastic#67719) [ENDPOINT][INGEST]Task/endpoint ingest update (elastic#67234) Fix code coverage for jest, upload merged reports (elastic#68149) ...
* [ML] WIP filter support * [ML] value selector * [ML] only supported filter aggs as options * [ML] WIP apply config * [ML] fix form persistence * [ML] refactor * [ML] support clone * [ML] validation, get es config * [ML] support "exists", fixes for the term form, validation * [ML] fix ts issues * [ML] don't perform request on adding incomplete agg * [ML] basic range number support * [ML] filter bool agg support * [ML] functional tests * [ML] getAggConfigFromEsAgg tests * [ML] fix unit tests * [ML] agg name update on config change, add unit tests * [ML] update snapshot * [ML] range selector enhancements * [ML] improve types * [ML] update step for range selector to support float numbers * [ML] range validation * [ML] term selector improvements * [ML] fix switch between advanced editor * [ML] prefix test ids * [ML] support helper text for aggs item






Summary
Resolves #60015. Adds support for the filter aggregations:
The following filter aggs are presented:
All the other filter aggs use the plain code editor for now.
Please pay attention to filter aggs field support mapping, this dictionary has to be completed. I haven't found the documentation for kibana field types I can look up to resolve it.
Checklist
Delete any items that are not applicable to this PR.