Is it possible to enable indexing of elastic search fields selectively for a type?
Through the mapping settings for a specific index, one can set the property
Ashay code works properly, but as it does not include an index directive the documents will be stored but not indexed, so you will not able to searches or aggregations.
I suggest include it next way:
PUT _template/disable_all_analyzer
{
"template": "*",
"mappings": {
"_default_": {
"dynamic_templates": [
{ "notanalyzed": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "keyword",
"index": "not_analyzed"
}
}
}
]
}
}
}