-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Add scripted_metric agg context to unsigned_long #64422
Add scripted_metric agg context to unsigned_long #64422
Conversation
Also enhance documentation to provide more examples how unsigned_long field should be used in scripts Closes elastic#64347
Pinging @elastic/es-search (:Search/Search) |
@elasticmachine run elasticsearch-ci/2 |
Stalled because of #64361, until we make a decision how to handle |
Is it still needed @mayya-sharipova ? |
Hi @mayya-sharipova, I've created a changelog YAML for you. |
@elasticmachine run elasticsearch-ci/part-2 |
I've added changes based on @stu-elastic's PR #76519. @stu-elastic would appreciate a review from you. |
init_script: | | ||
state.sqrd = [] | ||
map_script: | | ||
double v = field('ul').asBigInteger(BigInteger.ZERO).doubleValue(); |
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 is added in 7.16
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.
@stu-elastic Thanks for your feedback. Indeed field
API was added in 7.16, but scripted_metric
agg context was added to unsigned_long
only from 8.1 ( I should correct 8.0
to 8.1
).
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 once the version check is updated
We introduced script values support for unsigned_long from 7.15 in elastic/elasticsearch#76519. But forgot add this document for 7.x. This just backport documentation from elastic/elasticsearch#64422.
Also enhance documentation to provide more examples
how unsigned_long field should be used in scripts
Relates to #60050
Closes #64347