Dangling Indices
- class elasticsearch.client.DanglingIndicesClient
To use this client, access
client.dangling_indices
from anElasticsearch
client. For example:from elasticsearch import Elasticsearch # Create the client instance client = Elasticsearch(...) # Use the dangling_indices client client.dangling_indices.<method>(...)
- delete_dangling_index(*, index_uuid, accept_data_loss, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)
Delete a dangling index. If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling. For example, this can happen if you delete more than
cluster.indices.tombstones.size
indices while an Elasticsearch node is offline.https://www.elastic.co/guide/en/elasticsearch/reference/8.17/dangling-index-delete.html
- Parameters:
index_uuid (str) – The UUID of the index to delete. Use the get dangling indices API to find the UUID.
accept_data_loss (bool) – This parameter must be set to true to acknowledge that it will no longer be possible to recove data from the dangling index.
master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Specify timeout for connection to master
timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Explicit operation timeout
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- import_dangling_index(*, index_uuid, accept_data_loss, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)
Import a dangling index.
If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling. For example, this can happen if you delete more than
cluster.indices.tombstones.size
indices while an Elasticsearch node is offline.https://www.elastic.co/guide/en/elasticsearch/reference/8.17/dangling-index-import.html
- Parameters:
index_uuid (str) – The UUID of the index to import. Use the get dangling indices API to locate the UUID.
accept_data_loss (bool) – This parameter must be set to true to import a dangling index. 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.
master_timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Specify timeout for connection to master
timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Explicit operation timeout
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- list_dangling_indices(*, error_trace=None, filter_path=None, human=None, pretty=None)
Get the dangling indices.
If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling. For example, this can happen if you delete more than
cluster.indices.tombstones.size
indices while an Elasticsearch node is offline.Use this API to list dangling indices, which you can then import or delete.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/dangling-indices-list.html