How to set default mapping for string as "not_analyzed"? No luck with dynamic_templates
I tried running this below template first in my CURL
PUT /my_index
{
"mappings": {
"my_type": {
"dynamic_templates": [
{ "notanalyzed": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index": "not_analyzed"
}
}
}
]
}
}
}
Then with same index and type , i created a document. It seems the string value is not set to "not_analyzed" by default
Any one is having step by step solution for this or I am missing something