[ML] Fix counters and percentages for array fields on the Data visualizer page#55209
Conversation
|
Pinging @elastic/ml-ui (:ml) |
|
@elasticmachine merge upstream |
|
I have a question about the aggregation changes: The previous code added aggregation configurations directly like |
peteharverson
left a comment
There was a problem hiding this comment.
Gave this a good test, and all LGTM
walterra
left a comment
There was a problem hiding this comment.
Discussed my comment with @peteharverson — LGTM!
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…izer page (elastic#55209) * [ML] update data visualizer endpoint to check doc counts * [ML] fix mock for cardinality tests * [ML] use actual field name for agg filtering instead of safeFieldName Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…izer page (elastic#55209) * [ML] update data visualizer endpoint to check doc counts * [ML] fix mock for cardinality tests * [ML] use actual field name for agg filtering instead of safeFieldName Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…izer page (#55209) (#55519) * [ML] update data visualizer endpoint to check doc counts * [ML] fix mock for cardinality tests * [ML] use actual field name for agg filtering instead of safeFieldName Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…izer page (#55209) (#55518) * [ML] update data visualizer endpoint to check doc counts * [ML] fix mock for cardinality tests * [ML] use actual field name for agg filtering instead of safeFieldName Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* master: (38 commits) [ML] Fix counters and percentages for array fields on the Data visualizer page (elastic#55209) [SIEM][Detection Engine] Tags being turned into null rules part deux (elastic#55507) [DOCS] Add tip for using elasticsearch-certutil http command (elastic#55357) [SIEM][Detection Engine] Critical blocker, fixes schema accepting values it should not (elastic#55488) [SIEM] Detections create prepackage rules (elastic#55403) [Reporting] Convert CSV Export libs to Typescript (elastic#55117) [Maps] show field type icons in data driven styling field select (elastic#55166) Adds event log for actions and alerting (elastic#45081) [SIEM][Detection Engine] Fixes critical blocker where signals on signals are not operating [SIEM][Detection Engine] Critical blocker, adds need REST prefix for cloud remove incorrect config (elastic#55427) Retain pinned filters when loading and clearing saved queries (elastic#54307) Resolver zoom, pan, and center controls (elastic#55221) Skip failing endpoint saga tests [skip-ci] Update migration guide to add rendering service example (elastic#54744) [DOCS] Updates to heat map page (elastic#55097) [Endpoint] Fix saga to start only after store is created and stopped on app unmount (elastic#55245) [Logs UI] Use the correct icons and labels in the feature cont… (elastic#55292) [Uptime] Handle locations with names but no geo data (elastic#55234) ...
Summary
Fixes #54734.
data_visualizerendpoints have been usingvalues_countandstatsaggregation to get the count of the field in the dataset, but with this approach for array fields, we ended up with an amount which higher than the actual amount of docs in the dataset.I've added a filter to the aggregation to retrieve the number of docs that contain the field for both
get_field_statsandget_overall_stats.Checklist
This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)This was checked for keyboard-only and screenreader accessibility