﻿---
title: High deleted-docs ratio
description: Describes what AutoOps detects and surfaces with the High deleted-docs ratio insight: Some indices retain a large share of documents marked deleted but not yet merged away.
url: https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch/high_deleted_docs_ratio
products:
  - Elastic Cloud Enterprise
  - Elastic Cloud Hosted
  - Elastic Cloud on Kubernetes
  - Elasticsearch
applies_to:
  - Elastic Cloud Hosted: Generally available
  - Elastic Cloud on Kubernetes: Generally available
  - Elastic Cloud Enterprise: Generally available
  - Self-managed Elastic deployments: Generally available
---

# High deleted-docs ratio
Some indices retain a large share of documents marked deleted but not yet merged away. Those tombstones still use disk and add work during searches.
<note>
  For a complete list of insights, refer to [AutoOps insights](https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch).
</note>


## Insight details


| Field     | Value                          |
|-----------|--------------------------------|
| Component | Elasticsearch                  |
| Severity  | Low                            |
| Scope     | Index                          |
| Domains   | disk-storage, index-management |


## Example: What you might see in AutoOps

The following is an example of what you might see when this insight is triggered. Real insights use live data and links from your deployment or cluster.

### High ratio of deleted documents on disk


#### What was detected

Some indices retain a high ratio of deleted documents that still occupy disk.
Highest ratio: logs-prod-000045 (500 GB, 42,000,000 total docs, 85% deleted).

#### Recommendations

<note>
  AutoOps shows different recommendations depending on how their conditions match your deployment or cluster.
</note>

<dropdown title="Force merge deleted documents">
  **Condition**: Always shown for this insight.Run a force merge with `only_expunge_deletes=true` on `logs-prod-000045`, `logs-prod-000046` to reclaim disk used by deleted documents. Use the action below.
  ```json
  ```

  <note>
    Requires the `manage cluster` privilege. Requires Elasticsearch 8.0.0 or later. This action changes cluster or index configuration.
  </note>
</dropdown>

<dropdown title="Reindex indices">
  **Condition**: Always shown for this insight.Reindex indices with many deleted documents into new indices. After reindex completes, delete the old indices to reclaim disk space.
</dropdown>


#### Background and impact

When you delete or update documents, Elasticsearch marks old versions as deleted rather than removing them immediately. Over time, a high deleted-docs ratio means much of the index size is tombstones. That wastes disk and can slow searches because more segments must be filtered.

## Guide

[Force a merge](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge)