OpenSearch/docs/reference/indices/dangling-index-import.asciidoc

66 lines
1.9 KiB
Plaintext

[[dangling-index-import]]
=== Import dangling index API
++++
<titleabbrev>Import dangling index</titleabbrev>
++++
Imports a dangling index.
[[dangling-index-import-api-request]]
==== {api-request-title}
[source,console]
--------------------------------------------------
POST /_dangling/<index-uuid>?accept_data_loss=true
--------------------------------------------------
// TEST[skip:Difficult to set up]
[[dangling-index-import-api-desc]]
==== {api-description-title}
include::{es-repo-dir}/indices/dangling-indices-list.asciidoc[tag=dangling-index-description]
Import a single index into the cluster by referencing its UUID. Use the
<<dangling-indices-list,List dangling indices API>> to locate the UUID of an index.
[[dangling-index-import-api-path-params]]
==== {api-path-parms-title}
`<index-uuid>`::
(Required, string)
UUID of the index to import, which you can find using the
<<dangling-indices-list,List dangling indices API>>.
[[dangling-index-import-api-query-params]]
==== {api-query-parms-title}
`accept_data_loss`::
(Required, Boolean)
This field must be set to `true` to import a dangling index. Because {es}
cannot know where the dangling index data came from or determine which shard
copies are fresh and which are stale, it cannot guarantee that the imported data
represents the latest state of the index when it was last in the cluster.
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeout]
[[dangling-index-import-api-example]]
==== {api-examples-title}
The following example shows how to import a dangling index:
[source,console]
--------------------------------------------------
POST /_dangling/zmM4e0JtBkeUjiHD-MihPQ?accept_data_loss=true
--------------------------------------------------
// TEST[skip:Difficult to set up]
The API returns following response:
[source,console-result]
--------------------------------------------------
{
"acknowledged" : true
}
--------------------------------------------------