# Compatible field type

**URL:** <https://discuss.elastic.co/t/compatible-field-type/191346>\
**Category:** Logstash\
**Created:** [July 19, 2019, 8:24am UTC](https://discuss.elastic.co/t/compatible-field-type/191346 "2019-07-19T08:24:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![theo1991](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@theo1991](https://discuss.elastic.co/u/theo1991)\
**Post date:** [July 19, 2019, 8:24am UTC](https://discuss.elastic.co/t/compatible-field-type/191346/1 "2019-07-19T08:24:14Z")

</div>

Hi everybody,

I want to use visualizations in Kibana and it went right until I want to use specific fields.  
I want to count the number of events in my logs, which are at the field event\_count.  
In my grok filter, the event\_count is : %{NUMBER:event\_count}.  
But when I look at Elasticsearch, here is the output of the index :

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

```

How could it be possible ? I have no \_grokparsefailure, and when I look at the other fields, all the fileds which I have declared as NUMBER in my grok filter have also this text type index.

Thank you

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 19, 2019, 12:51pm UTC](https://discuss.elastic.co/t/compatible-field-type/191346/2 "2019-07-19T12:51:54Z")

</div>

> [@theo1991](#):
>
> %{NUMBER:event\_count}

Use %{NUMBER:event\_count:int} or %{NUMBER:event\_count:float}. Once you start ingesting into a new index they will have numeric type.

---

<div class="post-metadata">

**Author:** ![theo1991](https://avatars.discourse-cdn.com/v4/letter/t/4da419/32.png) [@theo1991](https://discuss.elastic.co/u/theo1991)\
**Post date:** [July 19, 2019, 1:40pm UTC](https://discuss.elastic.co/t/compatible-field-type/191346/3 "2019-07-19T13:40:50Z")

</div>

Thank you !

---

<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:** [August 16, 2019, 1:41pm UTC](https://discuss.elastic.co/t/compatible-field-type/191346/4 "2019-08-16T13:41:02Z")

</div>

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