I create an index template affecting all indices matching "shoppers-*" but then, when creating an index of this name format, the template is not applied, the mapping is not retrieved.
- create template
PUT /_index_template/my-template
{
"index_patterns": [
"shoppers-*"
],
"template": {
"mappings": {
"properties": {
"shopper": {
"properties": {
"tag": {
"type": "keyword"
}
}
}
}
},
"aliases": {
"my-template-alias": {}
}
}
}
{
"acknowledged": true
}
- then create an index
PUT /shoppers-0001
{
"acknowledged": true,
"shards_acknowledged": true,
"index": "shoppers-0001"
}
- refresh
POST /shoppers-0001/_refresh
{
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
}
}
- retrieve mapping on the newly created index
GET /shoppers-0001/_mapping
{
"shoppers-0001": {
"mappings": {}
}
}
I cannot figure what could prevent the template to be applied to this index... Any things I may check to help debug this?