elasticsearch 无法使用Elasticsearch中的索引模板正确映射索引
我有一个索引模板创建如下elasticsearch 无法使用Elasticsearch中的索引模板正确映射索引,elasticsearch,indexing,elasticsearch,Indexing,我有一个索引模板创建如下 PUT _template/es-logs { "index_patterns": ["es-*"], "template": { "settings": { "number_of_shards": 2, "number_of_replicas": 1 }, "mappings": { "_source": { "enabled": false }, "propert
PUT _template/es-logs
{
"index_patterns": ["es-*"],
"template": {
"settings": {
"number_of_shards": 2,
"number_of_replicas": 1
},
"mappings": {
"_source": {
"enabled": false
},
"properties": {
"conn_state" : {
"type" : "keyword"
},
"content_length" : {
"type" : "long"
},
"content_type" : {
"type" : "keyword"
},
"createdDate" : {
"type" : "keyword"
},
"dst_ip" : {
"type" : "ip"
},
"dst_port" : {
"type" : "long"
},
"duration" : {
"type" : "keyword"
},
"history" : {
"type" : "keyword"
},
"local_orig" : {
"type" : "keyword"
},
"missed_bytes" : {
"type" : "long"
},
"orig_bytes" : {
"type" : "keyword"
},
"orig_ip_bytes" : {
"type" : "long"
},
"orig_pkts" : {
"type" : "long"
},
"protocol" : {
"type" : "keyword"
},
"resp_bytes" : {
"type" : "keyword"
},
"resp_ip_bytes" : {
"type" : "long"
},
"resp_pkts" : {
"type" : "long"
},
"service" : {
"type" : "keyword"
},
"src_ip" : {
"type" : "ip"
},
"src_port" : {
"type" : "long"
},
"timestamp" : {
"type" : "date",
"format" : "yyyy-MM-dd HH:mm:ss.SSS"
},
"uid" : {
"type" : "keyword"
}
}
}
}
}
然而,当我尝试使用lambda函数将数据从s3存储桶传输到ES时,我的索引并没有使用模板进行映射。相反,它显示所有映射为“文本”的字段。我的索引名是“es-logs-2020-5-22”
感谢您为解决此问题提供的任何帮助。谢谢