Delete by query tests

This commit is contained in:
Honza Kral 2013-07-22 00:40:20 +02:00
parent 2fb0ec9feb
commit 1e98b711ca

View File

@ -0,0 +1,43 @@
---
"Basic delete_by_query":
- do:
index:
index: test_1
type: test
id: 1
body: { foo: bar }
- do:
index:
index: test_1
type: test
id: 2
body: { foo: baz }
- do:
index:
index: test_1
type: test
id: 3
body: { foo: foo }
- do:
indices.refresh: {}
- do:
delete_by_query:
index: test_1
body:
match:
foo: bar
- is_true: ok
- do:
indices.refresh: {}
- do:
count:
index: test_1
- match: { count: 2 }