The field name cannot have store = true – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.9-7.1

Briefly, this error occurs when you try to set the “store” attribute to “true” for a field in Elasticsearch that doesn’t support this setting. Not all field types support the “store” attribute. To resolve this issue, you can either change the field type to one that supports the “store” attribute or remove the “store” attribute from the field’s mapping. Alternatively, you can use the “_source” field to retrieve the original data, which is a common practice in Elasticsearch and often negates the need for the “store” attribute.

This guide will help you check for common problems that cause the log ” The field [” + name + “] cannot have store = true ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “The field [” + name + “] cannot have store = true” class name is WildcardFieldMapper.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
} @Override
public Builder store(boolean store) {
if (store) {
throw new MapperParsingException("The field [" + name + "] cannot have store = true");
}
return this;
} @Override
} @Override public Builder store(boolean store) { if (store) { throw new MapperParsingException("The field [" + name + "] cannot have store = true"); } return this; } @Override
 }  @Override
 public Builder store(boolean store) {
 if (store) {
 throw new MapperParsingException("The field [" + name + "] cannot have store = true");
 }
 return this;
 }  @Override

 

 [ratemypost]

Opster
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.