Hello everyone,
Need help to identify the differences between the subject mentioned endpoints usage.
_index_template endpoint
POST _index_template/index-template-1
{
"index_patterns": ["logs-2019*"],
"template": {
"mappings": {"properties":
{
"v1":{"type":"short"},
"timestamp": {"type": "date","format": "strict_date"}}}
}
}
_template endpoint
POST _template/i_master_template2
{
"index_patterns":["logs-2020*"],
"mappings": {"properties":
{
"v1":{"type":"short"},
"timestamp": {"type": "date","format": "strict_date"}}}
}
}
Though the previous request were successful, when running GET _index_template it only returns one of the recently created index templates.
{
"index_templates" : [
{
"name" : "index-template-1",
"index_template" : {
"index_patterns" : [
"logs-2019*"
],
"template" : {
"mappings" : {
"properties" : {
"v1" : {
"type" : "short"
},
"timestamp" : {
"format" : "strict_date",
"type" : "date"
}
}
}
},
"composed_of" : [ ]
}
]
}