Numeric Type mapping - Index template error


(sridhar) #1

I am getting below error for one of the index template .
Defined type as Float ,it should be integer ?

at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.lang.NumberFormatException: For input string: "1140/13"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) ~[?:?]
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122) ~[?:?]
at java.lang.Float.parseFloat(Float.java:451) ~[?:1.8.0_121]


(Christian Dahlqvist) #2

That is not a valid number format, so will result in an error. If that is a fraction, you will need to evaluate it before indexing it.


(sridhar) #3

@Christian_Dahlqvist: Thanks !!..

I have changed it to text and also got new exception with long format
Caused by: java.lang.NumberFormatException: For input string: "12345678901234567890123"

  "ID": {
    "type": "long",
    "fields": {
      "keyword": {
        "ignore_above": 256,
        "type": "keyword"
      }
    }
  },

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.