-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* adding documentation for dangling index api Signed-off-by: ariamarble <[email protected]> * made editorial changes Signed-off-by: ariamarble <[email protected]> Signed-off-by: ariamarble <[email protected]> (cherry picked from commit 3720f19) Co-authored-by: Aria Marble <[email protected]>
- Loading branch information
1 parent
32e85fc
commit 2c42274
Showing
1 changed file
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
layout: default | ||
title: Dangling indexes | ||
parent: index-apis | ||
grand_parent: REST API reference | ||
nav_order: 84 | ||
--- | ||
|
||
# Dangling indexes API | ||
|
||
After a node joins a cluster, dangling indexes occur if any shards exist in the node's local directory that do not already exist in the cluster. Dangling indexes can be listed, deleted, or imported. | ||
|
||
## Path and HTTP methods | ||
|
||
List dangling indexes: | ||
|
||
``` | ||
GET /_dangling | ||
``` | ||
|
||
Import a dangling index: | ||
|
||
``` | ||
POST /_dangling/<index-uuid> | ||
``` | ||
|
||
Delete a dangling index: | ||
|
||
``` | ||
DELETE /_dangling/<index-uuid> | ||
``` | ||
|
||
## Path parameters | ||
|
||
Path parameters are required. | ||
|
||
Path parameter | Description | ||
:--- | :--- | ||
index-uuid | UUID of index. | ||
|
||
## Query parameters | ||
|
||
Query parameters are optional. | ||
|
||
Query parameter | Data Type | Description | ||
:--- | :--- | :--- | ||
accept_data_loss | Boolean | Must be set to `true` for an `import` or `delete` because Opensearch is unaware of where the dangling index data came from. | ||
timeout | Time units | The amount of time to wait for a response. If no response is received in the defined time period, an error is returned. Default is `30` seconds. | ||
master_timeout | Time units | The amount of time to wait for the connection to the cluster manager. If no response is received in the defined time period, an error is returned. Default is `30` seconds. | ||
|
||
## Examples | ||
|
||
The following are sample requests and a sample response. | ||
|
||
#### Sample list | ||
|
||
````bash | ||
GET /_dangling | ||
```` | ||
|
||
#### Sample import | ||
|
||
````bash | ||
POST /_dangling/msdjernajxAT23RT-BupMB?accept_data_loss=true | ||
```` | ||
|
||
#### Sample delete | ||
|
||
````bash | ||
DELETE /_dangling/msdjernajxAT23RT-BupMB?accept_data_loss=true | ||
```` | ||
|
||
#### Sample response body | ||
|
||
````json | ||
{ | ||
"_nodes": { | ||
"total": 1, | ||
"successful": 1, | ||
"failed": 0 | ||
}, | ||
"cluster_name": "opensearch-cluster", | ||
"dangling_indices": [msdjernajxAT23RT-BupMB] | ||
} | ||
```` |