Source indices have been deleted or closed – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.3-8.9

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

Briefly, this error occurs when Elasticsearch tries to perform operations on source indices that have been deleted or closed. This could be due to a misconfiguration or an accidental deletion. To resolve this issue, you can either reopen the closed indices using the ‘open index’ API, or recreate the deleted indices. Ensure that the indices are properly configured and protected to prevent accidental deletion or closure in the future. Also, regularly monitor your Elasticsearch cluster to detect any anomalies early.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” Source indices have been deleted or closed. ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, source, indices.

Log Context

Log “Source indices have been deleted or closed.” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 ActionListener.wrap(r -> {
 try {
 final Aggregations aggregations = r.getAggregations();
 if (aggregations == null) {
 new ElasticsearchStatusException("Source indices have been deleted or closed."; RestStatus.BAD_REQUEST)
 final CompositeAggregation agg = aggregations.get(COMPOSITE_AGGREGATION_NAME);
 if (agg == null || agg.getBuckets().isEmpty()) {


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?