# Convert string to integer

**URL:** <https://discuss.elastic.co/t/convert-string-to-integer/277915>\
**Category:** Kibana\
**Created:** [July 6, 2021, 6:44am UTC](https://discuss.elastic.co/t/convert-string-to-integer/277915 "2021-07-06T06:44:26Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ANKITA\_SAHA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankita_saha/32/91152_2.png) [@ANKITA\_SAHA](https://discuss.elastic.co/u/ANKITA_SAHA)\
**Post date:** [July 7, 2021, 7:26am UTC](https://discuss.elastic.co/t/convert-string-to-integer/277915/3 "2021-07-07T07:26:45Z")

</div>

```auto
"hour": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },

```

The problem is it is reading the heading 'hour' as a result it converts entire field to text.  
I created ingest pipeline to convert str to int and reindex but unfortunately it always gives error like "type" : "number\_format\_exception", "reason" : "for input string: "hour""

---

_[View the full topic](https://discuss.elastic.co/t/convert-string-to-integer/277915)._
