ES 5.6, Centos 7
Here is the example: above is index template, the bottom is the created index mapping.
Noticed that the field with keyword type is replaced by the text type with keyword filelds.
{
"aliases": {
"analytics": {},
"analytics_meta": {}
},
"mappings": {
"_default_": {
"_all": {
"enabled": false
},
"date_detection": false,
"dynamic": "strict",
"numeric_detection": false,
"properties": {}
},
"pipelineHeartbeat_v2016012400": {
"_all": {
"enabled": false
},
"date_detection": false,
"dynamic": "strict",
"dynamic_templates": [],
"numeric_detection": false,
"properties": {
"@timestamp": {
"index": false,
"store": false,
"type": "date"
},
"buildVersion": {
"doc_values": true,
"index": true,
"type": "keyword"
},
"header": {
"dynamic": "strict",
"properties": {
"indexTimestamp": {
"doc_values": true,
"format": "date_optional_time",
"type": "date"
},
"location": {
"doc_values": true,
"index": true,
"type": "keyword"
},
"messageType": {
"doc_values": true,
"index": true,
"type": "keyword"
},
"messageVersion": {
"doc_values": true,
"index": true,
"type": "keyword"
},
"pipeline": {
"doc_values": true,
"index": true,
"type": "keyword"
}
}
},
"source": {
"doc_values": true,
"ignore_above": 128,
"index": true,
"type": "keyword"
}
}
}
},
"settings": {
"index.mapper.dynamic": false,
"index.mapping.coerce": false,
"number_of_replicas": "1",
"number_of_shards": "3",
"routing.allocation.total_shards_per_node": "3"
},
"template": "analytics_meta_v*"
}
{
"analytics_meta_v17-2018.08": {
"aliases": {
"all_data-2018.08": {},
"analytics-2018.08": {},
"analytics_meta-2018.08": {}
},
"mappings": {
"pipelineHeartbeat_v2016012400": {
"properties": {
"@timestamp": {
"type": "date"
},
"buildVersion": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"header": {
"properties": {
"indexTimestamp": {
"type": "date"
},
"location": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"messageType": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"messageVersion": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"pipeline": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"source": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
},
"settings": {
"index": {
"number_of_shards": "5",
"provided_name": "analytics_meta_v17-2018.08",
"creation_date": "1533079858882",
"unassigned": {
"node_left": {
"delayed_timeout": "1m"
}
},
"number_of_replicas": "1",
"uuid": "_mLVHf8UTByRRtUkrmj6Fg",
"version": {
"created": "5061099",
"upgraded": "5061199"
}
}
}
}
}