No such index and MapperService INDEX MAPPER DYNAMIC SETTING getKey is false – 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 dynamic index creation setting is turned off. To resolve this issue, you can either create the index manually before trying to access it, or you can enable dynamic index creation by setting the “index.mapper.dynamic” setting to true. Alternatively, you can check your application code to ensure it’s not trying to access a non-existent index.

This guide will help you check for common problems that cause the log ” no such index and [” + MapperService.INDEX_MAPPER_DYNAMIC_SETTING.getKey() + “] is [false] ” 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 [” + MapperService.INDEX_MAPPER_DYNAMIC_SETTING.getKey() + “] is [false]” class name is AutoCreateIndex.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 final AutoCreate autoCreate = this.autoCreate;
 if (autoCreate.autoCreateIndex == false) {
 throw new IndexNotFoundException("no such index and [" + AUTO_CREATE_INDEX_SETTING.getKey() + "] is [false]"; index);
 }
 if (dynamicMappingDisabled) {
 throw new IndexNotFoundException("no such index and [" + MapperService.INDEX_MAPPER_DYNAMIC_SETTING.getKey() + "] is [false]";
 index);
 }
 // matches not set; default value of "true"
 if (autoCreate.expressions.isEmpty()) {
 return true;

 

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?