Skip to content

Conversation

@mayya-sharipova
Copy link
Contributor

Also enhance documentation to provide more examples
how unsigned_long field should be used in scripts

Relates to #60050
Closes #64347

Also enhance documentation to provide more examples
how unsigned_long field should be used in scripts

Closes elastic#64347
@mayya-sharipova mayya-sharipova added the :Search/Search Search-related issues that do not fall into other categories label Oct 30, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Oct 30, 2020
@mayya-sharipova mayya-sharipova added >enhancement v7.11.0 v8.0.0 and removed Team:Search Meta label for search team labels Oct 30, 2020
@mayya-sharipova
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

@mayya-sharipova
Copy link
Contributor Author

Stalled because of #64361, until we make a decision how to handle unsigned_long in scripts.

@jimczi
Copy link
Contributor

jimczi commented Apr 23, 2021

Is it still needed @mayya-sharipova ?

@elasticsearchmachine
Copy link
Collaborator

Hi @mayya-sharipova, I've created a changelog YAML for you.

@mayya-sharipova
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/part-2

@mayya-sharipova
Copy link
Contributor Author

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();
Copy link
Contributor

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

Copy link
Contributor Author

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).

Copy link
Contributor

@stu-elastic stu-elastic left a 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

@mayya-sharipova mayya-sharipova merged commit bf3208b into elastic:master Feb 2, 2022
@mayya-sharipova mayya-sharipova deleted the unsigned_long_scripted_metric branch February 2, 2022 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :Search/Search Search-related issues that do not fall into other categories v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Script Error when using unsigned long in a scripted_metric