-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Fix counters and percentages for array fields on the Data visualizer page #55209
[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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave this a good test, and all LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
…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 <[email protected]>
…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 <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…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 <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* 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_visualizer
endpoints have been usingvalues_count
andstats
aggregation 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_stats
andget_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