Index does not exist Returning empty response – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 8.9-8.9

Briefly, this error occurs when Elasticsearch tries to access an index that does not exist in the database. This could be due to a typo in the index name, or the index may have been deleted. To resolve this issue, you can check the index name for any spelling mistakes or case sensitivity issues. If the index was deleted, you can recreate it. Alternatively, you can use the Elasticsearch API to list all available indices to ensure the index you’re trying to access actually exists.

This guide will help you check for common problems that cause the log ” Index [{}] does not exist. Returning empty response. ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, index.

Log Context

Log “Index [{}] does not exist. Returning empty response.” class name is TransportGetProfilingAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 submitListener.onResponse(responseBuilder.build());
 }
 }; e -> {
 // Data streams are created lazily; if even the "full" index does not exist no data have been indexed yet.
 if (e instanceof IndexNotFoundException) {
 log.debug("Index [{}] does not exist. Returning empty response."; ((IndexNotFoundException) e).getIndex());
 submitListener.onResponse(responseBuilder.build());
 } else {
 submitListener.onFailure(e);
 }
 }));

 

 [ratemypost]