OpenSearch/rest-api-spec/test/update/22_doc_as_upsert.yaml

46 lines
858 B
YAML

---
"Doc as upsert":
- skip:
version: "0-0.90.1"
reason: "doc_as_upsert added in 0.90.2"
- do:
update:
index: test_1
type: test
id: 1
body:
doc: { foo: bar, count: 1 }
doc_as_upsert: 1
- do:
get:
index: test_1
type: test
id: 1
- match: { _source.foo: bar }
- match: { _source.count: 1 }
- do:
update:
index: test_1
type: test
id: 1
body:
doc: { count: 2 }
doc_as_upsert: 1
- do:
get:
index: test_1
type: test
id: 1
- match: { _source.foo: bar }
- match: { _source.count: 2 }