rest-api-spec.test.update.20_doc_upsert.yml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest-api-spec Show documentation
Show all versions of rest-api-spec Show documentation
OpenSearch subproject :rest-api-spec
The newest version!
---
"Doc upsert":
- do:
update:
index: test_1
id: 1
body:
doc: { foo: bar, count: 1 }
upsert: { foo: baz }
- do:
get:
index: test_1
id: 1
- match: { _source.foo: baz }
- is_false: _source.count
- do:
update:
index: test_1
id: 1
body:
doc: { foo: bar, count: 1 }
upsert: { foo: baz }
- do:
get:
index: test_1
id: 1
- match: { _source.foo: bar }
- match: { _source.count: 1 }
© 2015 - 2024 Weber Informatics LLC | Privacy Policy