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
Should we allow Painless scripts to be longer? #23209
Comments
I think it should be part of the context. |
The context is hard coded, no? In that case, which contexts would have an increased size limit? |
Discussed in FixItFriday - contexts may make sense, eg search scripts should be small and fast, while update scripts might allow for more complexity. |
This is no rwal limitation, it's only for display purposes. You misunderstood that! Scripts can be longer, of course. It is just that the stack trace would not contain the full painless script as source code where normal classes have the file name. This is just a limitation of the class file format, not arbitrary. |
Oh sorry, ignore that. It's not the limit in the class file generator. |
@cbuescher #25527 I have nearly 150 variables which must be passed to the script which handles calculations between these variables and the same number of fields in a document, then documents are scored by the resulting value. |
Any possibility of allowing larger painless scripts in 6.0? |
Another user has requested that this hardcoded limit be increased or removed. It is preventing them fulfilling their requirements. |
Contexts are done so probably worth adding this as a setting at some point. |
Closed by #35184 |
Thanks for fixing! I found another issue with the size limit which is that source code comments also count to the total script length. Because my scripts are usually well commented, I now hit this limit so I needed to implement a way to minify Painless scripts before sending them to ES as workaround. Refer to |
Right now we hard code the limit on Painless scripts. I think the limit we set was fairly arbitrary. I've had folks ask about bumping the limit. Maybe we should bump the limit ourselves or make it a part of the script script context when we have a context?
The text was updated successfully, but these errors were encountered: