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

confusing documentation ES 5.0 script plugin #21567

Closed
rboorugu opened this issue Nov 15, 2016 · 6 comments
Closed

confusing documentation ES 5.0 script plugin #21567

rboorugu opened this issue Nov 15, 2016 · 6 comments
Assignees
Labels
>docs General docs changes

Comments

@rboorugu
Copy link

your documentation is contradictory
page below describes how to use Native (Java) Scripts in 5.0 which uses ScriptModule
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-native.html

here in this page https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_50_plugins.html
it indicates below

ScriptPlugin
Plugins that register custom scripts should implement ScriptPlugin and remove their onModule(ScriptModule) implementation.

@dakrone
Copy link
Member

dakrone commented Nov 15, 2016

@clintongormley it looks like this is fixed in 5.x and master with your commit 34d90b04, should that one be backported to 5.0 also?

@dakrone dakrone added the >docs General docs changes label Nov 15, 2016
@rboorugu
Copy link
Author

got it bit it should be as below right - changed "id" to "inline"?

curl -XPOST localhost:9200/_search -d '{
"query": {
"function_score": {
"query": {
"match": {
"body": "foo"
}
},
"functions": [
{
"script_score": {
"script": {
"inline": "my_script",
"lang" : "native"
}
}
}
]
}
}
}'

@clintongormley
Copy link
Contributor

@rjernst you'll know better than me which is correct and which incorrect

@rjernst
Copy link
Member

rjernst commented Nov 17, 2016

@rboorugu Your snippet looks correct to me.

FYI, I actually (mostly) fixed the docs referenced here in #21414 (however, I missed a single line referring to ScriptModule). But I also should have backported those doc fixes to 5.0 branch (will do that now).

@rjernst
Copy link
Member

rjernst commented Nov 17, 2016

Ok I backported that doc part of my change: 151d6b7

@rjernst rjernst closed this as completed Nov 17, 2016
@rjernst
Copy link
Member

rjernst commented Nov 17, 2016

I also fixed the remaining reference to ScriptModule:
master: 914664d
5.x: c912163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes
Projects
None yet
Development

No branches or pull requests

4 participants