Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Need help to understand the difference between GET /_index_template/<template name> and GET _cat/templates?v output

In elastic _cat/templates?v output, I see two templates:

"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": "[]"
},

However, when I try to check the template name using GET /_index_template/, only "flowlog" returns a result but "flowlogtmplt" returns 404 error. Why does not elastic recognize "flowlogtmplt" as index template?

GET /_index_template/flowlog

{
    "index_templates": [
        {
            "name": "flowlog",
            "index_template": {
                "index_patterns": [
                    "flowlog-*"
                ],
                "template": {
                    "settings": {
                        "index": {
                            "lifecycle": {
                                "name": "flowlog"
                            }
                        }
                    }
                },
                "composed_of": []
            }
        }
    ]
}

GET /_index_template/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
}

This is related to need-help-to-understand-elasticsearch-mapping-output
Thank you.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

GET _cat/templates returns

So you should try this instead

GET _template/flowlogtmplt
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading