-
Notifications
You must be signed in to change notification settings - Fork 25k
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
[DOC] Fix mathematical representation on interval (range) #27450
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
@elasticmachine ok to test |
@@ -14,7 +14,8 @@ To make this more formal, here is the rounding function that is used: | |||
bucket_key = Math.floor((value - offset) / interval) * interval + offset | |||
-------------------------------------------------- | |||
|
|||
The `interval` must be a positive decimal, while the `offset` must be a decimal in `[0, interval[`. | |||
The `interval` must be a positive decimal, while the `offset` must be a decimal in `[0, interval)` | |||
(a decimal greater than or euqal to `0` and less than `interval`) |
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.
Typo: "equal" not "euqal"
|
||
This can be best illustrated with an example. If there are 10 documents with values ranging from 5 to 14, using interval `10` will result in | ||
two buckets with 5 documents each. If an additional offset `5` is used, there will be only one single bucket [5-14] containing all the 10 | ||
This can be best illustrated with an example. If there are 10 documents with integer values ranging from 5 to 14, using interval `10` will result in |
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.
This sentence is true even if the values are not integers.
@@ -266,10 +267,10 @@ The above will sort the buckets based on the avg rating among the promoted produ | |||
==== Offset | |||
|
|||
By default the bucket keys start with 0 and then continue in even spaced steps of `interval`, e.g. if the interval is 10 the first buckets | |||
(assuming there is data inside them) will be [0 - 9], [10-19], [20-29]. The bucket boundaries can be shifted by using the `offset` option. | |||
(assuming there is data inside them) will be [0, 10), [10, 20), [20, 30). The bucket boundaries can be shifted by using the `offset` option. |
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.
For consistency, can you format these ranges as code (i.e. within backticks
) please?
This can be best illustrated with an example. If there are 10 documents with values ranging from 5 to 14, using interval `10` will result in | ||
two buckets with 5 documents each. If an additional offset `5` is used, there will be only one single bucket [5-14] containing all the 10 | ||
This can be best illustrated with an example. If there are 10 documents with integer values ranging from 5 to 14, using interval `10` will result in | ||
two buckets with 5 documents each. If an additional offset `5` is used, there will be only one single bucket [5, 15) containing all the 10 |
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.
For consistency, can you format this range as code (i.e. within backticks
) please?
Thanks @aeroastro - as a mathematician I like this change. I left a handful of comments. @elasticmachine please test again but with feeling this time. |
* Fix typo on equal * Remove redundant integer * code format
@DaveCTurner |
Ok, I suspect the CI build is failing because your branch is based off 40fe786 from back in December. Could you merge the current master into your branch and we'll try again? |
@DaveCTurner |
LGTM, but it's not an area I'm 100% familiar with so asking @colings86 to glance over it too. Thanks again @aeroastro. |
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 for the contribution @aeroastro! |
* master: (41 commits) [Test] Fix AggregationsTests#testFromXContentWithRandomFields [DOC] Fix mathematical representation on interval (range) (elastic#27450) Update version check for CCS optional remote clusters Bump BWC version to 6.1.0 for elastic#27469 Adapt rest test BWC version after backport Fix dynamic mapping update generation. (elastic#27467) Use the primary_term field to identify parent documents (elastic#27469) Move composite aggregation to core (elastic#27474) Fix test BWC version after backport Protect shard splitting from illegal target shards (elastic#27468) Cross Cluster Search: make remote clusters optional (elastic#27182) [Docs] Fix broken bulleted lists (elastic#27470) Move resync request serialization assertion Fix resync request serialization Fix issue where pages aren't released (elastic#27459) Add YAML REST tests for filters bucket agg (elastic#27128) Remove tcp profile from low level nio channel (elastic#27441) [TEST] Fix `GeoShapeQueryTests#testPointsOnly` failure Transition transport apis to use void listeners (elastic#27440) AwaitsFix GeoShapeQueryTests#testPointsOnly elastic#27454 ...
Thank you 🐱 |
I have fixed mathematical representation on intervals of histogram.
cf.
https://en.wikipedia.org/wiki/Interval_(mathematics)#Including_or_excluding_endpoints