Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch 2.11.1
Describe the issue:
Is there documentation describing the changes/additional features from the legacy _template endpoint and the _index_template endpoint?
Any disadvantages of continuing to use the _template endpoint to manage the templates?
Are there any features which require using the _index_template endpoint or both can be used interchangeably since _template is still supported?
By continuing to use _template, can it break anything?
Is there any list of pros and cons of using the two endpoints?
After migrating from OpenSearch 1.x to 2.x, is it possible to migrate the templates created using _template endpoint to the newer _index_template endpoint?
Also, when I try to create an index template using the legacy api using OpenSearch 1.3.7 as follows,
PUT _template/daily_logs
{
"index_patterns": [
"logs-2020-01-*"
],
"template": {
"aliases": {
"my_logs": {}
},
"settings": {
"number_of_shards": 2,
"number_of_replicas": 1
},
"mappings": {
"properties": {
"timestamp": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
},
"value": {
"type": "double"
}
}
}
}
}
and then create an index PUT logs-2020-01-01, the index shows, aliases and mappings as empty. Is there any change required in the request for creating index template using legacy api?
{
"logs-2020-01-01" : {
"aliases" : { },
"mappings" : { },
"settings" : {
"index" : {
"creation_date" : "1707663709139",
"number_of_shards" : "1",
"number_of_replicas" : "1",
"uuid" : "8hMaz3XoSLKsv3jcmfAnDw",
"version" : {
"created" : "135248527"
},
"provided_name" : "logs-2020-01-01"
}
}
}
}