delete_index.asciidoc 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --
  2. :api: delete-index
  3. :request: DeleteIndexRequest
  4. :response: DeleteIndexResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Delete Index API
  8. [id="{upid}-{api}-request"]
  9. ==== Delete Index Request
  10. A +{request}+ requires an `index` argument:
  11. ["source","java",subs="attributes,callouts,macros"]
  12. --------------------------------------------------
  13. include-tagged::{doc-tests-file}[{api}-request]
  14. --------------------------------------------------
  15. <1> Index
  16. ==== Optional arguments
  17. The following arguments can optionally be provided:
  18. ["source","java",subs="attributes,callouts,macros"]
  19. --------------------------------------------------
  20. include-tagged::{doc-tests-file}[{api}-request-timeout]
  21. --------------------------------------------------
  22. <1> Timeout to wait for the all the nodes to acknowledge the index deletion as a `TimeValue`
  23. <2> Timeout to wait for the all the nodes to acknowledge the index deletion as a `String`
  24. ["source","java",subs="attributes,callouts,macros"]
  25. --------------------------------------------------
  26. include-tagged::{doc-tests-file}[{api}-request-masterTimeout]
  27. --------------------------------------------------
  28. <1> Timeout to connect to the master node as a `TimeValue`
  29. <2> Timeout to connect to the master node as a `String`
  30. ["source","java",subs="attributes,callouts,macros"]
  31. --------------------------------------------------
  32. include-tagged::{doc-tests-file}[{api}-request-indicesOptions]
  33. --------------------------------------------------
  34. <1> Setting `IndicesOptions` controls how unavailable indices are resolved and
  35. how wildcard expressions are expanded
  36. include::../execution.asciidoc[]
  37. [id="{upid}-{api}-response"]
  38. ==== Delete Index Response
  39. The returned +{response}+ allows to retrieve information about the executed
  40. operation as follows:
  41. ["source","java",subs="attributes,callouts,macros"]
  42. --------------------------------------------------
  43. include-tagged::{doc-tests-file}[{api}-response]
  44. --------------------------------------------------
  45. <1> Indicates whether all of the nodes have acknowledged the request
  46. If the index was not found, an `ElasticsearchException` will be thrown:
  47. ["source","java",subs="attributes,callouts,macros"]
  48. --------------------------------------------------
  49. include-tagged::{doc-tests-file}[{api}-notfound]
  50. --------------------------------------------------
  51. <1> Do something if the index to be deleted was not found