[DOCS] Update examples to groovy.

This commit is contained in:
Brian Murphy 2014-07-22 14:45:46 +01:00
parent 7d9b012ca1
commit e3b1aed0fc
1 changed files with 4 additions and 3 deletions

View File

@ -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
-----------------------------------