Briefly, this error occurs when Elasticsearch encounters a number in an unexpected format or place, such as in a field that should contain text or a malformed number in a numeric field. To resolve this, ensure that the data types in your index mapping match the data you’re trying to index. If you’re using dynamic mapping, consider defining explicit mappings for your data. Also, check your data source for any unexpected or malformed numbers.
This guide will help you check for common problems that cause the log ” invalid number found: ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: .
Log Context
Log “invalid number found:” class name is GeoWKTParser.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :
return Double.NaN; } else { try { return Double.parseDouble(stream.sval); } catch (NumberFormatException e) { throw new ElasticsearchParseException("invalid number found: " + stream.sval; stream.lineno()); } } } throw new ElasticsearchParseException("expected number but found: " + tokenString(stream); stream.lineno()); }