"index templates are deprecated and will be replaced by the composable templates".
But when we enter composable templates documentation we have statement:
"You cannot directly apply a component template to a data stream or index. To be applied, a component template must be included in an index template’s"
So I understand nothing; index templates are replaced by component templates but component templates require... index templates.
So now what will be correct syntax to apply mapping template on indices?
Suppose I have indices test_index* and want that field name 'name' is text and 'client number' is integer?
I understand that it is a bit confusing as the name has not changed but the technical background has. I hope I can make it more comprehensible.
The obvious differences first:
When looking into a fairly recent version of Kibana, the menu entry Index Templates is now divided into Index Templates and Legacy Index Templates:
The API differs too as the legacy API endpoint is /_template while the new templates can be accessed by /_index_template.
So what is the difference between them?
While both types can be applied to indexes using a wildcard the way they are applied differs. Legacy index templates are merged together with higher priority overwriting settings from templates with lower priority. This worked well but had the potential to break things if a template is being changed having undesired affects to some indexes and it was hard to have an overview which index templates were applied.
The new templates solve that by adding an intermediate layer: Templates are not merged anymore - only the template with the highes priority is used. Instead, you can create reusable building blocks to solve reoccuring tasks which are included in each index template. This way, you do not have du duplicate settings or mappings to each template while still having a single point of truth which settings are applied.
This depends largely on your usecase:
If you have no reusable blocks at all just go to Kibana Administration page, choose Index Management->Index templates and select Create Template (NOT `Create legacy template!). This will guide you trough the steps of creating the template.
If you might want to reuse settings or mappings you might want to break those into reusable building blocks first. With the Component templatesfeature in Kibana this is a guided process.
Why don't you use Kibana? It guides you through the creation.
You don't - component templates are not applied to indexes directly but are used in an index template. The index templates are then applied to an index pattern
OK, I think I got that. Composite template is a block of index template.
I.E. index template is a container with sometimes composite templates in.
Documentation is not clear at all.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.