-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
make painless the default scripting language for ScriptProcessor #20981
Conversation
@@ -80,7 +84,7 @@ public Factory(ScriptService scriptService) { | |||
@Override | |||
public ScriptProcessor create(Map<String, Processor.Factory> registry, String processorTag, | |||
Map<String, Object> config) throws Exception { | |||
String lang = readStringProperty(TYPE, processorTag, config, "lang"); | |||
String lang = readStringProperty(TYPE, processorTag, config, "lang", "painless"); |
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.
Why is this hardcoded at all, and not just using the ScriptService and the default that is configured there?
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 simply because I was not aware there was such default behavior in the ScriptService. I will move defaulting responsibility to the ScriptService, will update. thanks!
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.
Left a tiny comment, LGTM
@@ -69,6 +69,10 @@ public String getType() { | |||
return TYPE; | |||
} | |||
|
|||
public Script getScript() { |
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.
getter can be package protected?
- fixes a bug in the docs that mentions `lang` as optional - now `lang` defaults to "painless"
lang
as optionallang
defaults to "painless"Closes #20943.