在弹性猫/模板?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错误。为什么弹性不承认"flowlogtmplt“为索引模板?
获取/_索引模板/流日志
{
"index_templates": [
{
"name": "flowlog",
"index_template": {
"index_patterns": [
"flowlog-*"
],
"template": {
"settings": {
"index": {
"lifecycle": {
"name": "flowlog"
}
}
}
},
"composed_of": []
}
}
]
}
获取/_index模板/flowlogtmplt
{
"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相关的谢谢。
发布于 2022-11-04 02:47:44
GET _cat/templates
返回
GET _template/*
获得的相同的GET _index_template/*
获得的相同的返回所以你应该试试这个
GET _template/flowlogtmplt
https://stackoverflow.com/questions/74315671
复制