Type to search.

High deleted-docs ratio

ECH

Elastic Cloud Hosted lets you manage and configure one or more deployments of the versioned Elastic Stack, hosted on Elastic Cloud.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

ECK

Elastic Cloud on Kubernetes extends Kubernetes orchestration capabilities to allow you to deploy and manage components of the Elastic Stack.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

ECE

Elastic Cloud Enterprise is a self-managed orchestration platform for deploying and managing the Elastic Stack at scale.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Self-managed

Self-managed deployments are Elastic Stack deployments managed without the assistance of an orchestrator.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

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.

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

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.

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).

Note

AutoOps shows different recommendations depending on how their conditions match your deployment or cluster.

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
POST logs-archive-000001/_forcemerge?only_expunge_deletes=true
Note

Requires the manage cluster privilege. Requires Elasticsearch 8.0.0 or later. This action changes cluster or index configuration.

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.

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.

Force a merge