在elastic _cat/templates?v输出中,我看到两个模板:
"1": {
"name": "flowlogtmplt",
"index_patterns": "[flowlog*, flowobsrv*]",
"order": "0",
"version": null,
"composed_of": ""
},
"14": {
"name": "flowlog",
"index_patterns": "[flowlog-*]",
"order": "0",
"version": null,
"composed_of": "[]"
},
但是,当我尝试使用GET /_index_template/检查模板名称时,只有“flowlog”返回结果,而“flowlogtmplt”返回404错误。为什么elastic无法将“flowlogtmplt”识别为索引模板?
GET /_索引_模板/流日志
{
"index_templates": [
{
"name": "flowlog",
"index_template": {
"index_patterns": [
"flowlog-*"
],
"template": {
"settings": {
"index": {
"lifecycle": {
"name": "flowlog"
}
}
}
},
"composed_of": []
}
}
]
}
GET /_索引模板/流程日志mplt
{
"error": {
"root_cause": [
{
"type": "resource_not_found_exception",
"reason": "index template matching [flowlogtmplt] not found"
}
],
"type": "resource_not_found_exception",
"reason": "index template matching [flowlogtmplt] not found"
},
"status": 404
}
这与need-help-to-understand-elasticsearch-mapping-output有关,谢谢。
1条答案
按热度按时间hrirmatl1#
GET _cat/templates
返回GET _template/*
得到的相同值GET _index_template/*
得到的相同值所以你应该试试这个