创建新索引时,Elasticsearch会忽略我的索引模板映射



无论我做什么,当使用心跳进程创建索引时(7.10.2(Elasticsearch映射所有字段,monitor.id将类似于:

GET /heartbeat-7.10.2-2021.05.25
[...]
"monitor" : {
"properties" : {
"id" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
[...]

即使我删除了索引、模板,并将模板更新为:

{
"order" : 1,
"index_patterns" : [
"heartbeat-7.10.2-*"
],
"settings" : {
},
"mappings" : {
"dynamic": false,
"properties" : {
"monitor" : {
"properties" : {
"id" : {
"ignore_above" : 1024,
"type" : "keyword"
}
}
}
}
},
"aliases" : { }
}

模板配置似乎被忽略了。没有其他检测信号模板。这是有问题的,因为这样我就不能使用例如monitor.id进行聚合。这是多个字段的问题。

我对模板比较陌生,所以可能我遗漏了一些东西。

所以很明显,我同时拥有_template和_index_template,并且_index_tmplate具有优先级

之后

delete _index_template/heartbeat*

它工作得很好。

最新更新