﻿---
title: Empty Indices
description: Describes what AutoOps detects and surfaces with the Empty Indices insight: Many shards or indices in the cluster contain no documents.
url: https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch/empty_indices
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
---

# Empty Indices
Many shards or indices in the cluster contain no documents. Shard balancing counts shards per node, not how much data each shard holds, so empty shards spread like busy ones.
<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  | Medium                                          |
| Scope     | Index                                           |
| Domains   | performance, index-management, shard-allocation |


## Customization settings

You can customize these settings to adjust when AutoOps detects this event and presents the insight. Refer to [AutoOps event settings](https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/monitor/autoops/ec-autoops-event-settings) for details.
The default customization settings are:

| Setting                               | Type            | Default |
|---------------------------------------|-----------------|---------|
| Exclude indices based on this pattern | List of strings |         |
| Total empty indices threshold         | Integer         | 50      |


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

### Many shards in the cluster are empty


#### What was detected

The number of empty indices: 12
The number of empty shards: 12
Examples of empty indices: `logs-prod-000045`, `logs-prod-000046`

#### Recommendations

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

<dropdown title="Delete empty indices">
  **Condition**: Always shown for this insight.Delete empty indices that you no longer need to reduce empty shard count. Confirm they are safe to remove before you run 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="Set up or review ILM">
  **Condition**: Always shown for this insight.Create or update an ILM policy to control rollover shard size and maximum write age, preventing empty shards from accumulating.
</dropdown>

<dropdown title="Optimize shard design">
  **Condition**: Always shown for this insight.From Elasticsearch 8.4, use [ILM](https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/manage-data/lifecycle/index-lifecycle-management) min and max index age and document count to avoid empty or too-frequent rollovers. On earlier versions, schedule deletion of empty indices as part of routine maintenance.
</dropdown>


#### Background and impact

Impact: The empty shards can cause the node workload to become unbalanced, causing some nodes to work much harder than the others due to the naive shard-balance nature of the cluster. This could lead to hot-spots of unbalanced, loaded data nodes and bottlenecks.
Description: The cluster shard balancer ensures that all data nodes hold the same number of shards, which is what leads to some nodes holding very active shards, while others hold many empty ones.