I'm trying to verify if a template is getting applied to my index. I have my template to set certain fields to be non-analyzed, but the _mapping api doesn't show if it is or not.
Here is my template when I do a GET _tempate/sales*
{
"sales_template": {
"order": 0,
"template": "sales_*",
"settings": {
"index": {
"number_of_shards": "5",
"number_of_replicas": "1"
}
},
"mappings": {
"sales": {
"_all": {
"enabled": false
},
"properties": {
"total_sale_amount": {
"type": "double"
},
"location": {
"index": "not_analyzed",
"type": "text"
}
}
}
},
"aliases": {}
}
}
GET sales_20/_mapping
{
"sales_20": {
"mappings": {
"weekly_sales": {
"_all": {
"enabled": false
},
"properties": {
"location": {
"type": "text"
},
"total_sale_amount": {
"type": "double"
}
}
}
}
}
}
I feel that when I get the mapping for the index it should say the location is non_analyzed.