2014-07-14 09:37:55 -04:00
|
|
|
---
|
|
|
|
"Indexed script":
|
|
|
|
|
2015-02-12 12:07:42 -05:00
|
|
|
- skip:
|
|
|
|
features: groovy_scripting
|
|
|
|
|
2014-07-14 09:37:55 -04:00
|
|
|
- do:
|
2014-07-16 05:46:55 -04:00
|
|
|
put_script:
|
2014-07-14 09:37:55 -04:00
|
|
|
id: "1"
|
|
|
|
lang: "groovy"
|
|
|
|
body: { "script": "_score * doc[\"myParent.weight\"].value" }
|
|
|
|
- match: { _id: "1" }
|
|
|
|
|
|
|
|
- do:
|
2014-07-16 05:46:55 -04:00
|
|
|
get_script:
|
2014-07-14 09:37:55 -04:00
|
|
|
id: "1"
|
|
|
|
lang: "groovy"
|
|
|
|
- match: { "script": "_score * doc[\"myParent.weight\"].value" }
|
|
|
|
|
|
|
|
- do:
|
2014-07-16 05:46:55 -04:00
|
|
|
delete_script:
|
2014-07-14 09:37:55 -04:00
|
|
|
id: "1"
|
|
|
|
lang: "groovy"
|
|
|
|
- match: { found: true }
|
|
|
|
- match: { _index: ".scripts" }
|
|
|
|
- match: { _id: "1" }
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: request
|
2014-07-16 05:46:55 -04:00
|
|
|
put_script:
|
2014-07-14 09:37:55 -04:00
|
|
|
id: "1"
|
|
|
|
lang: "groovy"
|
|
|
|
body: { "script": "_score * foo bar + doc[\"myParent.weight\"].value" }
|
|
|
|
|
|
|
|
|
2014-07-16 11:30:18 -04:00
|
|
|
- do:
|
|
|
|
catch: /ElasticsearchIllegalArgumentException.Unable.to.parse.*/
|
|
|
|
put_script:
|
|
|
|
id: "1"
|
|
|
|
lang: "groovy"
|
|
|
|
body: { "script": "_score * foo bar + doc[\"myParent.weight\"].value" }
|
|
|
|
|
2014-07-14 09:37:55 -04:00
|
|
|
- do:
|
|
|
|
catch: request
|
2014-07-16 05:46:55 -04:00
|
|
|
put_script:
|
2014-07-14 09:37:55 -04:00
|
|
|
id: "1"
|
|
|
|
lang: "foobar"
|
|
|
|
body: { "script" : "_score * doc[\"myParent.weight\"].value" }
|
2014-07-16 11:30:18 -04:00
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: /ElasticsearchIllegalArgumentException.script_lang.not.supported/
|
|
|
|
put_script:
|
|
|
|
id: "1"
|
|
|
|
lang: "foobar"
|
|
|
|
body: { "script" : "_score * doc[\"myParent.weight\"].value" }
|
2014-07-14 09:37:55 -04:00
|
|
|
|