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"
}
}
}
}
}
}
}