# Logstash6 beta1- template output to Elasticsearch - 64bit int issue

**URL:** https://discuss.elastic.co/t/logstash6-beta1-template-output-to-elasticsearch-64bit-int-issue/100793
**Category:** Logstash
**Created:** [September 17, 2017, 2:28pm UTC](https://discuss.elastic.co/t/logstash6-beta1-template-output-to-elasticsearch-64bit-int-issue/100793 "2017-09-17T14:28:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![randude](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/randude/32/34911_2.png) [@randude](https://discuss.elastic.co/u/randude)
#### Post date: [September 17, 2017, 2:28pm UTC](https://discuss.elastic.co/t/logstash6-beta1-template-output-to-elasticsearch-64bit-int-issue/100793/1 "2017-09-17T14:28:50Z")

</div>

Hi,  
I'm using logstash6 beta 1 to send json logs to my elasticsearch server.  
I'm using logstash's elasticsearch output plugin with the template option.  
How can i set the default mappings of all integers to be longs?  
I've got some fields that sometimes the first value can be 70 and then the second value is 700 billion.  
I dont want to map each and every fields to be specifically a long type.  
I'd like to change all integers to longs when creating a new index.

Here's my current template:  
{  
"template": "stuff-_",  
"version": 60001,  
"settings": {  
"index.refresh\_interval": "30s"  
},  
"mappings": {  
"default": {  
"dynamic\_templates": [  
{  
"string\_fields": {  
"match": "_",  
"match\_mapping\_type": "string",  
"mapping": {  
"type": "text",  
"norms": false,  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
}  
}  
}  
],  
"properties": {  
"@timestamp": {  
"type": "date"  
},  
"@version": {  
"type": "keyword"  
},  
"client\_geoip": {  
"dynamic": true,  
"properties": {  
"ip": {  
"type": "ip"  
},  
"location": {  
"type": "geo\_point"  
},  
"latitude": {  
"type": "half\_float"  
},  
"longitude": {  
"type": "half\_float"  
}  
}  
},  
"server\_geoip": {  
"dynamic": true,  
"properties": {  
"ip": {  
"type": "ip"  
},  
"location": {  
"type": "geo\_point"  
},  
"latitude": {  
"type": "half\_float"  
},  
"longitude": {  
"type": "half\_float"  
}  
}  
}  
}  
}  
}  
}

---

<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: [October 15, 2017, 2:29pm UTC](https://discuss.elastic.co/t/logstash6-beta1-template-output-to-elasticsearch-64bit-int-issue/100793/2 "2017-10-15T14:29:01Z")

</div>

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