dangling-index-import.asciidoc 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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-desc]]
  15. ==== {api-description-title}
  16. include::{es-repo-dir}/indices/dangling-indices-list.asciidoc[tag=dangling-index-description]
  17. Import a single index into the cluster by referencing its UUID. Use the
  18. <<dangling-indices-list,List dangling indices API>> to locate the UUID of an index.
  19. [[dangling-index-import-api-path-params]]
  20. ==== {api-path-parms-title}
  21. `<index-uuid>`::
  22. (Required, string)
  23. UUID of the index to import, which you can find using the
  24. <<dangling-indices-list,List dangling indices API>>.
  25. [[dangling-index-import-api-query-params]]
  26. ==== {api-query-parms-title}
  27. `accept_data_loss`::
  28. (Required, boolean)
  29. This field must be set to `true` to import a dangling index. Because {es}
  30. cannot know where the dangling index data came from or determine which shard
  31. copies are fresh and which are stale, it cannot guarantee that the imported data
  32. represents the latest state of the index when it was last in the cluster.
  33. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeout]
  34. [[dangling-index-import-api-example]]
  35. ==== {api-examples-title}
  36. The following example shows how to import a dangling index:
  37. [source,console]
  38. --------------------------------------------------
  39. POST /_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true
  40. --------------------------------------------------
  41. // TEST[skip:Difficult to set up]
  42. The API returns following response:
  43. [source,console-result]
  44. --------------------------------------------------
  45. {
  46. "acknowledged" : true
  47. }
  48. --------------------------------------------------