Document not found index id – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 8-8.9

Briefly, this error occurs when Elasticsearch tries to retrieve a document using a specific index and ID, but the document does not exist in the specified index. This could be due to the document being deleted, the index not existing, or the ID being incorrect. To resolve this issue, you can verify the existence of the index and the document ID. If the index or document ID is incorrect, correct it. If the document was deleted, you may need to recreate it or restore it from a backup if available.

This guide will help you check for common problems that cause the log ” Document not found [” + index + “]/[” + id + “] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: rest, index, document.

Log Context

Log “Document not found [” + index + “]/[” + id + “]” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 private static void checkResource(final GetResponse response) {
 final String index = response.getIndex();
 final String id = response.getId();  if (response.isExists() == false) {
 throw new ResourceNotFoundException("Document not found [" + index + "]/[" + id + "]");
 } else if (response.isSourceEmpty()) {
 throw new ResourceNotFoundException("Source not found [" + index + "]/[" + id + "]");


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?