Complete the code to define a component template with a settings block.
{
"template": {
"settings": [1]
}
}The settings block must be a JSON object with key-value pairs, so use curly braces and quotes.
Complete the code to add a mappings block with a dynamic template.
{
"template": {
"mappings": {
"dynamic_templates": [
{
"strings_as_keywords": {
"match_mapping_type": [1]
}
}
]
}
}
}The match_mapping_type for string fields is "string" in dynamic templates.
Fix the error in the component template by completing the lifecycle policy reference.
{
"template": {
"settings": {
"index.lifecycle.name": [1]
}
}
}The lifecycle policy name must be a string, so it needs to be quoted.
Fill both blanks to create a component template with an alias and a priority.
{
"template": {
"aliases": {
"[1]": {}
},
"priority": [2]
}
}The alias name should be a string key, and priority is a number. Here, "logs_alias" and 5 are correct.
Fill all three blanks to define a component template with settings, mappings, and aliases.
{
"template": {
"settings": [1],
"mappings": [2],
"aliases": {
"[3]": {}
}
}
}Settings define replicas, mappings define field types, and aliases are string keys.