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

[WIP] [ML] Fixes total hits count for distribution chart normalization. #31134

Closed
wants to merge 1 commit into from

Conversation

walterra
Copy link
Contributor

Summary

Fixes a regression for 7.x onwards: A change in how total hits get returned for queries broke the normalization for the event distribution chart.

This PR fixes it by adding track_total_hits: true to the query and adapting the code to retrieve the totalHits value.

@walterra walterra added non-issue Indicates to automation that a pull request should not appear in the release notes regression v7.0.0 :ml Feature:ml-results legacy - do not use v8.0.0 v7.2.0 labels Feb 14, 2019
@walterra walterra self-assigned this Feb 14, 2019
@walterra walterra requested a review from a team as a code owner February 14, 2019 15:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⚡️

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this fixes this one particular use of tracking total hits, I wonder if this should be rolled in with the follow up to #26421, and switch over all the places where we use rest_total_hits_as_int to use track_total_hits, considering whether we need to use the exact hits total, or just an estimate.

@walterra
Copy link
Contributor Author

@peteharverson good point, I now wrote #31179 to include rest_total_hits_as_int which is an equivalent fix like this PR but can be backported until 6.6. This means this PR is not as urgent anymore and can be used to add additional migrations to track_total_hits which I will add in follow-up commits.

@walterra walterra removed the v7.0.0 label Feb 14, 2019
@walterra
Copy link
Contributor Author

To be in line with the roadmap and requirements described in #26356, I removed the v7.0.0 label from this PR.

@walterra walterra added the WIP Work in progress label Feb 20, 2019
@walterra walterra changed the title [ML] Fixes total hits count for distribution chart normalization. [WIP] [ML] Fixes total hits count for distribution chart normalization. Feb 20, 2019
@walterra walterra removed the v7.2.0 label May 24, 2019
@sophiec20 sophiec20 added Feature:Anomaly Detection ML anomaly detection and removed Feature:ml-results legacy - do not use labels Jun 19, 2019
@walterra walterra marked this pull request as draft May 7, 2020 06:35
@walterra
Copy link
Contributor Author

Closing because of outdatedness. Opened this issue instead: #71852

@walterra walterra closed this Jul 15, 2020
@walterra walterra deleted the ml-fix-total-hits-count branch July 15, 2020 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Anomaly Detection ML anomaly detection :ml non-issue Indicates to automation that a pull request should not appear in the release notes regression v7.10.0 v8.0.0 WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants