2014-09-03 10:50:27 -04:00
|
|
|
---
|
|
|
|
"External version":
|
|
|
|
|
2015-02-12 12:07:42 -05:00
|
|
|
- skip:
|
|
|
|
features: groovy_scripting
|
|
|
|
|
|
|
|
|
2014-09-03 10:50:27 -04:00
|
|
|
- do:
|
|
|
|
put_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
body: { "script": "_score * doc[\"myParent.weight\"].value" }
|
|
|
|
version_type: external
|
|
|
|
version: 0
|
|
|
|
|
|
|
|
- match: { _version: 0 }
|
|
|
|
|
|
|
|
- do:
|
|
|
|
put_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
body: { "script": "_score * doc[\"myParent.weight\"].value" }
|
|
|
|
version_type: external
|
|
|
|
version: 5
|
|
|
|
|
|
|
|
- match: { _version: 5 }
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: conflict
|
|
|
|
get_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
version: 3
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: conflict
|
|
|
|
delete_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
version: 3
|
|
|
|
|
|
|
|
- do:
|
|
|
|
get_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
version: 5
|
|
|
|
version_type: external
|
|
|
|
- is_true: script
|
|
|
|
|
|
|
|
- do:
|
|
|
|
get_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
version: 5
|
|
|
|
version_type: external_gte
|
|
|
|
- is_true: script
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: conflict
|
|
|
|
get_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
version: 10
|
|
|
|
version_type: external_gte
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: conflict
|
|
|
|
delete_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
version: 3
|
|
|
|
version_type: external
|
|
|
|
|
|
|
|
- do:
|
|
|
|
get_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
version: 5
|
|
|
|
version_type: force
|
|
|
|
- is_true: script
|
|
|
|
|
|
|
|
- do:
|
|
|
|
get_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
version: 10
|
|
|
|
version_type: force
|
|
|
|
- is_true: script
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: conflict
|
|
|
|
put_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
body: { "script": "_score * doc[\"myParent.weight\"].value" }
|
|
|
|
version_type: external
|
|
|
|
version: 5
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: conflict
|
|
|
|
put_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
body: { "script": "_score * doc[\"myParent.weight\"].value" }
|
|
|
|
version_type: external
|
|
|
|
version: 0
|
|
|
|
|
|
|
|
- do:
|
|
|
|
put_script:
|
|
|
|
lang: groovy
|
|
|
|
id: 1
|
|
|
|
body: { "script": "_score * doc[\"myParent.weight\"].value" }
|
|
|
|
version_type: external
|
|
|
|
version: 6
|
|
|
|
|
|
|
|
- match: { _version: 6}
|