# Field NUMBER save as String

**URL:** <https://discuss.elastic.co/t/field-number-save-as-string/159349>\
**Category:** Logstash\
**Created:** [December 4, 2018, 11:52am UTC](https://discuss.elastic.co/t/field-number-save-as-string/159349 "2018-12-04T11:52:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viti](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@Viti](https://discuss.elastic.co/u/Viti)\
**Post date:** [December 4, 2018, 11:52am UTC](https://discuss.elastic.co/t/field-number-save-as-string/159349/1 "2018-12-04T11:52:06Z")

</div>

Hi,

I need to create an index for elasticsearch from logstash, but the fields number it's saved as String in elasticsearch.

This is my log:  
2019-12-08#22:19:04#2019120822190431913#2019-12-08T22:19:04.898+01:00#servidor#BLOWE#services\_test#TQWE2019120822190421513d#GZUTZRQU18MZIQA#AABBCCDDEEE#ABCDEF5#645#386#0#1031#

This is my grok:  
%{DATA:date}#%{DATA:hour}#%{DATA:date2}#%{DATA:date3}#%{DATA:server}#%{DATA:web}#%{DATA:services}#%{DATA:traza}#%{DATA:op}#%{DATA:orden}#%{DATA:bene}#%{NUMBER:time\_1}#%{NUMBER:time\_2}#%{NUMBER:time\_3}#%{NUMBER:time\_total}#

Output:  
{  
"date": [  
[  
"2019-12-08"  
]  
],  
"hour": [  
[  
"22:19:04"  
]  
],  
"date2": [  
[  
"2019120822190431913"  
]  
],  
"date3": [  
[  
"2019-12-08T22:19:04.898+01:00"  
]  
],  
"server": [  
[  
"servidor"  
]  
],  
"web": [  
[  
"BLOWE"  
]  
],  
"services": [  
[  
"services\_test"  
]  
],  
"traza": [  
[  
"TQWE2019120822190421513d"  
]  
],  
"op": [  
[  
"GZUTZRQU18MZIQA"  
]  
],  
"orden": [  
[  
"AABBCCDDEEE"  
]  
],  
"bene": [  
[  
"ABCDEF5"  
]  
],  
"time\_1": [  
[  
"645"  
]  
],  
"BASE10NUM": [  
[  
"645",  
"386",  
"0",  
"1031"  
]  
],  
"time\_2": [  
[  
"386"  
]  
],  
"time\_3": [  
[  
"0"  
]  
],  
"time\_total": [  
[  
"1031"  
]  
]  
}

I don't understand why send BASE10NUM with 4 numbers and time\_1, time\_2, time\_3 and time\_total and this values are saved as String

---

<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:** [January 1, 2019, 11:52am UTC](https://discuss.elastic.co/t/field-number-save-as-string/159349/2 "2019-01-01T11:52:07Z")

</div>

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