mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
* Remove `es-test-dir` book-scoped variable * Remove `plugins-examples-dir` book-scoped variable * Remove `:dependencies-dir:` and `:xes-repo-dir:` book-scoped variables - In `index.asciidoc`, two variables (`:dependencies-dir:` and `:xes-repo-dir:`) were removed. - In `sql/index.asciidoc`, the `:sql-tests:` path was updated to fuller path - In `esql/index.asciidoc`, the `:esql-tests:` path was updated idem * Replace `es-repo-dir` with `es-ref-dir` * Move `:include-xpack: true` to few files that use it, remove from index.asciidoc
71 lines
2.1 KiB
Text
71 lines
2.1 KiB
Text
[[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-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* If the {es} {security-features} are enabled, you must have the `manage`
|
|
<<privileges-list-cluster,cluster privilege>> to use this API.
|
|
|
|
[[dangling-index-import-api-desc]]
|
|
==== {api-description-title}
|
|
|
|
include::{es-ref-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-ref-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
|
|
|
|
[[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
|
|
}
|
|
--------------------------------------------------
|