10_basic.yaml 664 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---
  2. "Basic delete_by_query":
  3. - do:
  4. index:
  5. index: test_1
  6. type: test
  7. id: 1
  8. body: { foo: bar }
  9. - do:
  10. index:
  11. index: test_1
  12. type: test
  13. id: 2
  14. body: { foo: baz }
  15. - do:
  16. index:
  17. index: test_1
  18. type: test
  19. id: 3
  20. body: { foo: foo }
  21. - do:
  22. indices.refresh: {}
  23. - do:
  24. delete_by_query:
  25. index: test_1
  26. body:
  27. query:
  28. match:
  29. foo: bar
  30. - do:
  31. indices.refresh: {}
  32. - do:
  33. count:
  34. index: test_1
  35. - match: { count: 2 }