No such index and AUTO CREATE INDEX SETTING getKey – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-6.8

Briefly, this error occurs when Elasticsearch tries to access an index that doesn’t exist, and the auto-create index setting is disabled. This setting, when enabled, allows Elasticsearch to automatically create an index if it doesn’t exist during a write operation. To resolve this issue, you can either create the index manually before trying to write to it, or enable the auto-create index setting by updating the Elasticsearch configuration with “action.auto_create_index: true”.

This guide will help you check for common problems that cause the log ” no such index and [” + AUTO_CREATE_INDEX_SETTING.getKey() + “] ([ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index.

Log Context

Log “no such index and [” + AUTO_CREATE_INDEX_SETTING.getKey() + “] ([” class name is AutoCreateIndex.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 }
 throw new IndexNotFoundException("no such index and [" + AUTO_CREATE_INDEX_SETTING.getKey() + "] contains [-"
 + indexExpression + "] which forbids automatic creation of the index"; index);
 }
 }
 throw new IndexNotFoundException("no such index and [" + AUTO_CREATE_INDEX_SETTING.getKey() + "] ([" + autoCreate
 + "]) doesn't match"; index);
 }  AutoCreate getAutoCreate() {
 return autoCreate;

 

 [ratemypost]