Skip to content
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

Merged
merged 1 commit into from
Oct 18, 2016

Conversation

talevy
Copy link
Contributor

@talevy talevy commented Oct 17, 2016

  • fixes a bug in the docs that mentions lang as optional
  • now lang defaults to "painless"

Closes #20943.

@@ -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");
Copy link
Member

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?

Copy link
Contributor Author

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!

Copy link
Member

@martijnvg martijnvg left a 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() {
Copy link
Member

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"
@talevy talevy merged commit 38c650f into elastic:master Oct 18, 2016
@talevy talevy deleted the fix-20943 branch October 18, 2016 23:22
talevy added a commit that referenced this pull request Oct 18, 2016
)

- fixes a bug in the docs that mentions `lang` as optional
- now `lang` defaults to "painless"
talevy added a commit that referenced this pull request Oct 18, 2016
)

- fixes a bug in the docs that mentions `lang` as optional
- now `lang` defaults to "painless"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >docs General docs changes v5.0.0 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lang is still required in Ingest Script Processor
4 participants