Property value of field – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.7-7.9

value] cannot be changed from [keyword] to [text]. Briefly, this error occurs when you try to change the data type of an existing field in Elasticsearch. Elasticsearch does not allow changing the data type of a field once it has been created. To resolve this issue, you can either create a new index with the correct mappings or reindex your data into a new index with the correct mappings. Alternatively, you can add a new field with a different name and the desired data type to the existing index.

This guide will help you check for common problems that cause the log ” Property [value] of field [ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “Property [value] of field [” class name is ConstantKeywordFieldMapper.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
value = node.remove("value");
if (value == null) {
throw new MapperParsingException("Property [value] of field [" + name + "] can't be [null].");
}
if (value instanceof Number == false && value instanceof CharSequence == false) {
throw new MapperParsingException("Property [value] of field [" + name +
"] must be a number or a string; but got [" + value + "]");
}
}
ConstantKeywordFieldMapper.Builder builder = new ConstantKeywordFieldMapper.Builder(name);
if (value != null) {
value = node.remove("value"); if (value == null) { throw new MapperParsingException("Property [value] of field [" + name + "] can't be [null]."); } if (value instanceof Number == false && value instanceof CharSequence == false) { throw new MapperParsingException("Property [value] of field [" + name + "] must be a number or a string; but got [" + value + "]"); } } ConstantKeywordFieldMapper.Builder builder = new ConstantKeywordFieldMapper.Builder(name); if (value != null) {
 value = node.remove("value");
 if (value == null) {
 throw new MapperParsingException("Property [value] of field [" + name + "] can't be [null].");
 }
 if (value instanceof Number == false && value instanceof CharSequence == false) {
 throw new MapperParsingException("Property [value] of field [" + name +
 "] must be a number or a string; but got [" + value + "]");
 }
 }
 ConstantKeywordFieldMapper.Builder builder = new ConstantKeywordFieldMapper.Builder(name);
 if (value != null) {

 

 [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.