# Dangling Indices

class elasticsearch.client.DanglingIndicesClient

  To use this client, access `client.dangling_indices` from an `Elasticsearch` 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=None, 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/docs/api/doc/elasticsearch/operation/operation-dangling-indices-delete-dangling-index

    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 | None) – 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) – The period to wait for a connection to the master node.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a response.

      - 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=None, 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/docs/api/doc/elasticsearch/operation/operation-dangling-indices-import-dangling-index

    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 | None) – 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) – The period to wait for a connection to the master node.

      - timeout (str | Literal[-1] | ~typing.Literal[0] | None) – The period to wait for a response.

      - 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/docs/api/doc/elasticsearch/operation/operation-dangling-indices-list-dangling-indices

    Parameters:

      - error_trace (bool | None)

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

      - human (bool | None)

      - pretty (bool | None)

    Return type:

      ObjectApiResponse[Any]