From e3b1aed0fc04185f6cf1fff630faaf00d73bbd4d Mon Sep 17 00:00:00 2001 From: Brian Murphy Date: Tue, 22 Jul 2014 14:45:46 +0100 Subject: [PATCH] [DOCS] Update examples to groovy. --- docs/reference/modules/scripting.asciidoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/reference/modules/scripting.asciidoc b/docs/reference/modules/scripting.asciidoc index 41ef3361b87..eaaeb8c5324 100644 --- a/docs/reference/modules/scripting.asciidoc +++ b/docs/reference/modules/scripting.asciidoc @@ -93,7 +93,7 @@ of the script. In the `.scripts` index the type of the document will be set to t [source,js] ----------------------------------- -curl -XPOST localhost:9200/_scripts/mvel/indexedCalculateScore -d '{ +curl -XPOST localhost:9200/_scripts/groovy/indexedCalculateScore -d '{ "script": "log(_score * 2) + my_modifier" }' ----------------------------------- @@ -118,6 +118,7 @@ curl -XPOST localhost:9200/_search -d '{ { "script_score": { "script_id": "indexedCalculateScore", + "lang" : "groovy", "params": { "my_modifier": 8 } @@ -134,7 +135,7 @@ at query time. The script can be viewed by: [source,js] ----------------------------------- -curl -XGET localhost:9200/_scripts/mvel/calculate-score +curl -XGET localhost:9200/_scripts/mvel/indexedCalculateScore ----------------------------------- This is rendered as: @@ -149,7 +150,7 @@ This is rendered as: Indexed scripts can be deleted by: [source,js] ----------------------------------- -curl -XDELETE localhost:9200/_scripts/mvel/calculate-score +curl -XDELETE localhost:9200/_scripts/mvel/indexedCalculateScore -----------------------------------