-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Change painless scripted field #21026
Conversation
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
💔 Build Failed |
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
code review
Throwing an error for missing fields is a huge change that is going to cause a lot of upgrade pain for customers. Any reason why ES made this change?
Looks like the new script does not compile. Needs to be changed to
I removed the |
const script = `if (doc[\'machine.ram\'].size() == 0) { | ||
return -1; | ||
} else { | ||
return doc[\'machine.ram\'].value / (1024 * 1024 * 1024)'; |
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.
There is an extra '
at the end of this line that is invalid
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 hopping on this so quickly everyone.
💔 Build Failed |
Retest |
Retest |
💔 Build Failed |
💚 Build Succeeded |
We made it! |
* Change painless scripted field * Remove wrong char * Remove invalid escape chars
Due to elastic/elasticsearch#32207 our functional tests started failing on
master
.This PR changes the scripted field, that was failing to do the appropriate check if an actual value is present in the document.