--- "Doc as upsert": - 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 }