Skip to content

Commit c0d9ddb

Browse files
[OpenAPI] Edits dangling index APIs (#3055) (#3067)
1 parent 4659b3e commit c0d9ddb

File tree

6 files changed

+59
-25
lines changed

6 files changed

+59
-25
lines changed

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ actions:
101101
x-displayName: Index
102102
description: >
103103
Index APIs enable you to manage individual indices, index settings, aliases, mappings, and index templates.
104-
- name: dangling_indices
105-
x-displayName: Index - Import dangling index
106104
- name: ilm
107105
x-displayName: Index lifecycle management
108106
externalDocs:

output/openapi/elasticsearch-openapi.json

Lines changed: 13 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 16 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/dangling_indices/delete_dangling_index/DeleteDanglingIndexRequest.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,25 @@ import { Uuid } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323

2424
/**
25+
* Delete a dangling index.
26+
*
27+
* If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
28+
* For example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.
2529
* @rest_spec_name dangling_indices.delete_dangling_index
2630
* @availability stack since=7.9.0 stability=stable
31+
* @doc_tag indices
2732
*/
2833
export interface Request extends RequestBase {
2934
path_parts: {
35+
/**
36+
* The UUID of the index to delete. Use the get dangling indices API to find the UUID.
37+
*/
3038
index_uuid: Uuid
3139
}
3240
query_parameters: {
41+
/**
42+
* This parameter must be set to true to acknowledge that it will no longer be possible to recove data from the dangling index.
43+
*/
3344
accept_data_loss: boolean
3445
master_timeout?: Duration
3546
timeout?: Duration

specification/dangling_indices/import_dangling_index/ImportDanglingIndexRequest.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,26 @@ import { Uuid } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323

2424
/**
25+
* Import a dangling index.
26+
*
27+
* If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
28+
* For example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.
2529
* @rest_spec_name dangling_indices.import_dangling_index
2630
* @availability stack since=7.9.0 stability=stable
31+
* @doc_tag indices
2732
*/
2833
export interface Request extends RequestBase {
2934
path_parts: {
35+
/**
36+
* The UUID of the index to import. Use the get dangling indices API to locate the UUID.
37+
*/
3038
index_uuid: Uuid
3139
}
3240
query_parameters: {
41+
/**
42+
* This parameter must be set to true to import a dangling index.
43+
* Because Elasticsearch 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.
44+
*/
3345
accept_data_loss: boolean
3446
master_timeout?: Duration
3547
timeout?: Duration

specification/dangling_indices/list_dangling_indices/ListDanglingIndicesRequest.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@
2020
import { RequestBase } from '@_types/Base'
2121

2222
/**
23+
* Get the dangling indices.
24+
*
25+
* If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling.
26+
* For example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.
27+
*
28+
* Use this API to list dangling indices, which you can then import or delete.
2329
* @rest_spec_name dangling_indices.list_dangling_indices
2430
* @availability stack since=7.9.0 stability=stable
31+
* @doc_tag indices
2532
*/
2633
export interface Request extends RequestBase {}

0 commit comments

Comments
 (0)