mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-23 13:26:02 +00:00
Docs fix native script usage in 5.x (#22362)
This commit is contained in:
parent
816e1c6cc4
commit
117b63ed41
@ -36,6 +36,10 @@ public class MyNativeScriptPlugin extends Plugin implements ScriptPlugin {
|
||||
public boolean needsScores() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public String getName() {
|
||||
return "my_script";
|
||||
}
|
||||
}
|
||||
|
||||
public static class MyNativeScript extends AbstractDoubleSearchScript {
|
||||
@ -66,7 +70,7 @@ curl -XPOST localhost:9200/_search -d '{
|
||||
{
|
||||
"script_score": {
|
||||
"script": {
|
||||
"id": "my_script",
|
||||
"inline": "my_script",
|
||||
"lang" : "native"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user