I am trying to import a excel file into elasticSearch and have done that fine. But there are some documents (rows in excel) which are not included in the data injest. I digged into the issue with this and found that there is a field "SLA_Duration_in_Mins" in the excel sheet and all errors seen are when this field has certain alphabetic characters instead of usual numeric only characters. Even one of the error lines points to this.
org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [SLA_Duration_in_Mins] of type [float] in document with id '7WYKrW4B1DOOCdRQnMDR'. Preview of field's value: 'Queue is Not Applicable or Not Defined'
It seems that this the error is due to this field not being a float value instead of String which it is.
I am using excelastic to injest data into elasticSearch. Is there a way to specify String value for this field instead of expected floating value?
Below is the "caused by" error stack for reference:
Caused by: java.lang.NumberFormatException: For input string: "Queue is Not Applicable or Not Defined"
at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) ~[?:?]
at jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122) ~[?:?]
at java.lang.Float.parseFloat(Float.java:461) ~[?:?]
at org.elasticsearch.common.xcontent.support.AbstractXContentParser.floatValue(AbstractXContentParser.java:223) ~[elasticsearch-x-content-7.4.2.jar:7.4.2]
at org.elasticsearch.index.mapper.NumberFieldMapper$NumberType$2.parse(NumberFieldMapper.java:295) ~[elasticsearch-7.4.2.jar:7.4.2]
at org.elasticsearch.index.mapper.NumberFieldMapper$NumberType$2.parse(NumberFieldMapper.java:271) ~[elasticsearch-7.4.2.jar:7.4.2]
at org.elasticsearch.index.mapper.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:1046) ~[elasticsearch-7.4.2.jar:7.4.2]
at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:277) ~[elasticsearch-7.4.2.jar:7.4.2]