-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Scripting: Remove SearchScript #34730
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
Conversation
This commite removes the last non context based script class.
|
Pinging @elastic/es-core-infra |
This was accidentally left over when converting to FieldScript. closes elastic#34683
jdconrad
left a comment
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.
@rjernst This is awesome! Left one comment and adding one request - the change of contexts here puts the Painless docs out of date. Doesn't have to be this PR, but would you please update the context docs to reflect the changes at some point before 7.0?
| Compiler compiler = contextsToCompilers.get(context); | ||
|
|
||
| if (context.instanceClazz.equals(SearchScript.class)) { | ||
| Constructor<?> constructor = compile(compiler, scriptName, scriptSource, params); |
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 are two versions of the compile method. Now that the two special cases are gone for search/executable script contexts, would you please check to see if this version can be removed completely? It's possible some tests still use it, though.
This commit removes the last non context based script class.
With the removal of SearchScript (#34730), an extraneous compile method was left behind in PainlessScriptEngine. This change removes the method and updates the tests that depend on it to use the main compile method which gives better test coverage.
With the removal of SearchScript (elastic#34730), an extraneous compile method was left behind in PainlessScriptEngine. This change removes the method and updates the tests that depend on it to use the main compile method which gives better test coverage.
This commit removes the last non context based script class.