# Numeric Type mapping - Index template error

**URL:** https://discuss.elastic.co/t/numeric-type-mapping-index-template-error/82661
**Category:** Elasticsearch
**Created:** [April 18, 2017, 7:26am UTC](https://discuss.elastic.co/t/numeric-type-mapping-index-template-error/82661 "2017-04-18T07:26:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ajay1](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Ajay1](https://discuss.elastic.co/u/Ajay1)
#### Post date: [April 18, 2017, 7:26am UTC](https://discuss.elastic.co/t/numeric-type-mapping-index-template-error/82661/1 "2017-04-18T07:26:58Z")

</div>

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]

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [April 18, 2017, 7:30am UTC](https://discuss.elastic.co/t/numeric-type-mapping-index-template-error/82661/2 "2017-04-18T07:30:00Z")

</div>

> [@Ajay1](#):
>
> "1140/13"

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.

---

<div class="post-metadata">

### Author: ![Ajay1](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@Ajay1](https://discuss.elastic.co/u/Ajay1)
#### Post date: [April 19, 2017, 8:29am UTC](https://discuss.elastic.co/t/numeric-type-mapping-index-template-error/82661/3 "2017-04-19T08:29:47Z")

</div>

@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"
      }
    }
  },
```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 17, 2017, 8:41am UTC](https://discuss.elastic.co/t/numeric-type-mapping-index-template-error/82661/4 "2017-05-17T08:41:22Z")

</div>

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