Dangling Indices

class elasticsearch.client.DanglingIndicesClient(client)
Parameters:

client (BaseClient)

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.16/modules-gateway-dangling-indices.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)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

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.16/modules-gateway-dangling-indices.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)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

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.16/modules-gateway-dangling-indices.html

Parameters:
Return type:

ObjectApiResponse[Any]