2013-06-28 13:44:13 -04:00
|
|
|
---
|
|
|
|
"Doc upsert":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
update:
|
|
|
|
index: test_1
|
|
|
|
type: test
|
|
|
|
id: 1
|
|
|
|
body:
|
|
|
|
doc: { foo: bar, count: 1 }
|
|
|
|
upsert: { foo: baz }
|
|
|
|
|
|
|
|
- do:
|
|
|
|
get:
|
|
|
|
index: test_1
|
|
|
|
type: test
|
|
|
|
id: 1
|
|
|
|
|
|
|
|
- match: { _source.foo: baz }
|
2013-07-01 09:58:23 -04:00
|
|
|
- is_false: _source.count
|
2013-06-28 13:44:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
- do:
|
|
|
|
update:
|
|
|
|
index: test_1
|
|
|
|
type: test
|
|
|
|
id: 1
|
|
|
|
body:
|
|
|
|
doc: { foo: bar, count: 1 }
|
|
|
|
upsert: { foo: baz }
|
|
|
|
|
|
|
|
- do:
|
|
|
|
get:
|
|
|
|
index: test_1
|
|
|
|
type: test
|
|
|
|
id: 1
|
|
|
|
|
|
|
|
- match: { _source.foo: bar }
|
|
|
|
- match: { _source.count: 1 }
|
|
|
|
|
|
|
|
|