Index template not match as will after i modify it in dev-tool


(Gangxiong Chen) #1

first create index template like this use java transport client:
template 1
"order": 0,
"template": "log_*",
"settings": {
"index": {
"mapper": {
"dynamic": "true"
},
"mapping": {
"ignore_malformed": "true"
},
"refresh_interval": "30s"
}
},
"mappings": {
"log": {
"_all": {
"enabled": false
},
"properties": {
"_ip": {
"ignore_above": "32766",
"type": "keyword"
},
"_log": {
"type": "text"
}
}
}
},
"aliases": {}

template 2
"order": 1,
"template": "log_esearch-canal-20*",
"settings": { },
"mappings": {
"log": {
"properties": {
"logLevel": {
"ignore_above": "32766",
"type": "keyword"
},
"_log": {
"type": "text"
},
"_time": {
"format": "yyyy-MM-dd HH:mm:ss",
"type": "date"
}
}
}


then i create index "log_esearch-canal-20170726"
the index mapping contain properties[_ip, _log, logLevel, _time], this is what i want

but when i use dev-tool in kibana and use get & put to modify the first template's refresh_interval to "31s"
then i create index "log_esearch-canal-20170727"
the index mapping only contain properties which in the first template [_ip, _log]

es version : 5.2.2


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.