Hello,
Is it possible to put field alias in dynamic template? if so, can you please share some samples with field alias? I tried to find elastic document but couldn't find.
FYI,
currently I am working on below template but I need to add field alias (e.g. "time-taken" field alias with "time-taken-ms" field).
please advise. thank you!!
PUT _template/cloudfront_logs
{
"index_patterns": [
"cloudfront_*"
],
"settings": {
"number_of_replicas": 1,
"number_of_shards": 3
},
"mappings": {
"_doc": {
"dynamic_templates": [
{
"time-taken": {
"mapping": {
"type": "long"
},
"match": "time-taken"
}
},
{
"content-length": {
"mapping": {
"type": "long"
},
"match": "content-length"
}
},
{
"cs-bytes": {
"mapping": {
"type": "long"
},
"match": "cs-bytes"
}
},
{
"sc-bytes": {
"mapping": {
"type": "long"
},
"match": "sc-bytes"
}
},
{
"strings": {
"mapping": {
"type": "keyword"
},
"match_mapping_type": "string"
}
}
]
}
}
}