dangling-index-import.asciidoc 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [[dangling-index-import]]
  2. === Import dangling index API
  3. ++++
  4. <titleabbrev>Import dangling index</titleabbrev>
  5. ++++
  6. Imports a dangling index.
  7. [[dangling-index-import-api-request]]
  8. ==== {api-request-title}
  9. [source,console]
  10. --------------------------------------------------
  11. POST /_dangling/<index-uuid>?accept_data_loss=true
  12. --------------------------------------------------
  13. // TEST[skip:Difficult to set up]
  14. [[dangling-index-import-api-prereqs]]
  15. ==== {api-prereq-title}
  16. * If the {es} {security-features} are enabled, you must have the `manage`
  17. <<privileges-list-cluster,cluster privilege>> to use this API.
  18. [[dangling-index-import-api-desc]]
  19. ==== {api-description-title}
  20. include::{es-repo-dir}/indices/dangling-indices-list.asciidoc[tag=dangling-index-description]
  21. Import a single index into the cluster by referencing its UUID. Use the
  22. <<dangling-indices-list,List dangling indices API>> to locate the UUID of an index.
  23. [[dangling-index-import-api-path-params]]
  24. ==== {api-path-parms-title}
  25. `<index-uuid>`::
  26. (Required, string)
  27. UUID of the index to import, which you can find using the
  28. <<dangling-indices-list,List dangling indices API>>.
  29. [[dangling-index-import-api-query-params]]
  30. ==== {api-query-parms-title}
  31. `accept_data_loss`::
  32. (Required, Boolean)
  33. This field must be set to `true` to import a dangling index. Because {es}
  34. cannot know where the dangling index data came from or determine which shard
  35. copies are fresh and which are stale, it cannot guarantee that the imported data
  36. represents the latest state of the index when it was last in the cluster.
  37. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
  38. [[dangling-index-import-api-example]]
  39. ==== {api-examples-title}
  40. The following example shows how to import a dangling index:
  41. [source,console]
  42. --------------------------------------------------
  43. POST /_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true
  44. --------------------------------------------------
  45. // TEST[skip:Difficult to set up]
  46. The API returns following response:
  47. [source,console-result]
  48. --------------------------------------------------
  49. {
  50. "acknowledged" : true
  51. }
  52. --------------------------------------------------