-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[DOCS] Fix the weighed average documentation #81307
[DOCS] Fix the weighed average documentation #81307
Conversation
The documentations states that if the `weight` field is missing, and no explicit missing configuration is provided, a default value of 1 is used. This is incorrect and does not match the implementation of the weighted average aggregator. In this specific case the document is skipped, instead.
Pinging @elastic/es-docs (Team:Docs) |
Pinging @elastic/es-analytics-geo (Team:Analytics) |
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.
Thanks @salvatore-campagna. I left a suggestion that fixes up some incorrect text surrounding your change. Let me know what you think.
The `missing` parameter defines how documents that are missing a value should be treated. | ||
The default behavior is different for `value` and `weight`: | ||
|
||
By default, if the `value` field is missing the document is ignored and the aggregation moves on to the next document. | ||
If the `weight` field is missing, it is assumed to have a weight of `1` (like a normal average). | ||
By default, if the `value` or `weight` field is missing the document is ignored and the aggregation moves on to the next document. | ||
|
||
Both of these defaults can be overridden with the `missing` parameter: |
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.
Some of the text surrounding this change is still incorrect. For example:
The default behavior is different for
value
andweight
:
is still wrong.
I left a suggestion that fixes up the surrounding text and shortens this a bit. I also updated the text to mention null
values, which are treated the same as missing values based on my testing. Feel free to change the wording or let me know what you think.
The `missing` parameter defines how documents that are missing a value should be treated. | |
The default behavior is different for `value` and `weight`: | |
By default, if the `value` field is missing the document is ignored and the aggregation moves on to the next document. | |
If the `weight` field is missing, it is assumed to have a weight of `1` (like a normal average). | |
By default, if the `value` or `weight` field is missing the document is ignored and the aggregation moves on to the next document. | |
Both of these defaults can be overridden with the `missing` parameter: | |
By default, the aggregation excludes documents with a missing or `null` value | |
for the `value` or `weight` field. Use the `missing` parameter to specify a | |
default value for these documents instead. |
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.
LGTM. Thanks!
The documentations states that if the `weight` field is missing, and no explicit missing configuration is provided, a default value of 1 is used. This is incorrect and does not match the implementation of the weighted average aggregator. In this specific case the document is skipped, instead.
The documentations states that if the `weight` field is missing, and no explicit missing configuration is provided, a default value of 1 is used. This is incorrect and does not match the implementation of the weighted average aggregator. In this specific case the document is skipped, instead.
The documentations states that if the `weight` field is missing, and no explicit missing configuration is provided, a default value of 1 is used. This is incorrect and does not match the implementation of the weighted average aggregator. In this specific case the document is skipped, instead.
💚 Backport successful
|
The documentations states that if the `weight` field is missing, and no explicit missing configuration is provided, a default value of 1 is used. This is incorrect and does not match the implementation of the weighted average aggregator. In this specific case the document is skipped, instead.
The documentations states that if the `weight` field is missing, and no explicit missing configuration is provided, a default value of 1 is used. This is incorrect and does not match the implementation of the weighted average aggregator. In this specific case the document is skipped, instead.
The documentations states that if the `weight` field is missing, and no explicit missing configuration is provided, a default value of 1 is used. This is incorrect and does not match the implementation of the weighted average aggregator. In this specific case the document is skipped, instead.
This inconsistency has been found while working on #81306.
The documentations states that if the
weight
field is missing, and noexplicit missing configuration is provided, a default value of 1 is used.
This is incorrect and does not match the implementation of the weighted
average aggregator. In this specific case the document is skipped, instead.