ES create index template
PUT _template/cq_temple
{
"template": "cq-*",
"settings": {
"number_of_shards": 3
},
"mappings": {
"_default_": {
"dynamic_templates": [
{
"message_field": {
"path_match": "message",
"mapping": {
"norms": false,
"type": "text"
},
"match_mapping_type": "string"
}
},
{
"string_fields": {
"mapping": {
"norms": false,
"type": "keyword"
},
"match_mapping_type": "string",
"match": "*"
}
}
],
"_all": {
"norms": false,
"enabled": true
},
"properties": {
"@timestamp": {
"copy_to": false,
"type": "date"
},
"@version": {
"copy_to": false,
"type": "keyword"
},
"ElasticType": {
"copy_to": false,
"type": "keyword"
},
"ElasticDocType": {
"copy_to": false,
"type": "keyword"
}
}
}
}
}
{
"template": "cq-*",
"settings": {
"number_of_shards": 3
},
"mappings": {
"_default_": {
"dynamic_templates": [
{
"message_field": {
"path_match": "message",
"mapping": {
"norms": false,
"type": "text"
},
"match_mapping_type": "string"
}
},
{
"string_fields": {
"mapping": {
"norms": false,
"type": "keyword"
},
"match_mapping_type": "string",
"match": "*"
}
}
],
"_all": {
"norms": false,
"enabled": true
},
"properties": {
"@timestamp": {
"copy_to": false,
"type": "date"
},
"@version": {
"copy_to": false,
"type": "keyword"
},
"ElasticType": {
"copy_to": false,
"type": "keyword"
},
"ElasticDocType": {
"copy_to": false,
"type": "keyword"
}
}
}
}
}
posted on 2018-09-28 09:44 zhangfeitaimengle 阅读(195) 评论(0) 编辑 收藏 举报