I am trying to use component_templates per the warning I received after using old index template. It seems to work, other than the _tier_preference setting.
Specifically, setting "_tier_preference" to "data_content" or "data_hot", results in _tier_preference of null.
PUT _component_template/tier_preference_settings
{
"template": {
"settings": {
"index": {
"number_of_shards": "2",
"number_of_replicas": "0",
"routing": {
"allocation": {
"include": {
"_tier_preference": "data_hot"
}
}
}
}
}
}
}
put _component_template/tier_preference_mappings
{
"template": {
"mappings": {
"properties": {
"tp_string": {
"type": "keyword"
},
"tp_date": {
"type": "date"
}
}
}
}
}
PUT _index_template/tier_preference_template
{
"index_patterns": ["tier_preference*"],
"template": {
"settings": {
"routing": {
"allocation": {
"include": {
"_tier_preference": "data_hot"
}
}
}
}
},
"priority": 500,
"composed_of": ["tier_preference_settings", "tier_preference_mappings"],
"version": 1,
"_meta": {
"description": "tier preference test"
}
}
Then
POST /_index_template/_simulate_index/tier_preference-1
{
"template": {
"settings": {
"index": {
"number_of_shards": "2",
"number_of_replicas": "0",
"routing": {
"allocation": {
"include": {
"_tier_preference": null
}
}
}
}
},
"mappings": {
"properties": {
"tp_date": {
"type": "date"
},
"tp_string": {
"type": "keyword"
}
}
},
"aliases": {}
},
"overlapping": []
}
What am I missing?