Invalid number found – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

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());
 }

 

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