Update scripting.asciidoc

Fix script syntax for script_score

Closes #15096
This commit is contained in:
Clinton Gormley 2015-11-30 11:12:26 +01:00
parent 02798951ef
commit 9dbda2af62
1 changed files with 12 additions and 8 deletions

View File

@ -121,6 +121,7 @@ curl -XPOST localhost:9200/_search -d '{
"functions": [ "functions": [
{ {
"script_score": { "script_score": {
"script": {
"lang": "groovy", "lang": "groovy",
"file": "calculate-score", "file": "calculate-score",
"params": { "params": {
@ -128,6 +129,7 @@ curl -XPOST localhost:9200/_search -d '{
} }
} }
} }
}
] ]
} }
} }
@ -180,6 +182,7 @@ curl -XPOST localhost:9200/_search -d '{
"functions": [ "functions": [
{ {
"script_score": { "script_score": {
"script": {
"id": "indexedCalculateScore", "id": "indexedCalculateScore",
"lang" : "groovy", "lang" : "groovy",
"params": { "params": {
@ -187,6 +190,7 @@ curl -XPOST localhost:9200/_search -d '{
} }
} }
} }
}
] ]
} }
} }