OpenSearch/rest-api-spec/test/script/20_versions.yaml

117 lines
2.4 KiB
YAML

---
"External version":
- skip:
features: groovy_scripting
- 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}