Profile document not found – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 8.5-8.9

Briefly, this error occurs when Elasticsearch tries to retrieve a document that doesn’t exist in the index. This could be due to a wrong document ID or the document was deleted. To resolve this, ensure the document ID is correct and the document exists in the index. If the document was deleted, you may need to reindex or restore it from a backup. Also, check your application logic to prevent attempts to access non-existent documents.

This guide will help you check for common problems that cause the log ” profile document not found ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, document.

Log Context

Log “profile document not found” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 } else {
 logger.debug("Profile [{}] not found"; profileUid);
 errors.put(profileUid; new ResourceNotFoundException("profile document not found"));
 } else {
 assert false
 : "Inconsistent mget item response [" + itemResponse.getIndex() + "] [" + itemResponse.getId() + "]";
 logger.error("Inconsistent mget item response [{}] [{}]"; itemResponse.getIndex(); itemResponse.getId());