I have created an index named full_repo using below mappings.
{
"template": "full_repo",
"settings": {
"index": {
"analysis": {
"analyzer": {
"lowercase_keyword": {
"tokenizer": "keyword",
"char_filter": ["punctuation_filter", "sapce_filter"],
"filter": ["lowercase", "trim"]
}
},
"char_filter": {
"punctuation_filter": {
"type": "pattern_replace",
"pattern": "\\p{Punct}",
"replacement": ""
},
"sapce_filter": {
"type": "pattern_replace",
"pattern": "\\s+",
"replacement": " "
}
}
}
}
},
"mappings": {
"_default_": {
"dynamic_templates": [{
"string_fields": {
"match_mapping_type": "string",
"match": "^(?!message|Email_2|Phone_2|DESCRIPTION).*$",
"match_pattern": "regex",
"mapping": {
"type": "text",
"fields": {
"raw": {
"index": "not_analyzed",
"type": "text",
"analyzer": "lowercase_keyword"
}
}
}
}
}]
}
}
}
The issue is in Kibana every fields seems to be analyzed field even-though I gave it has not analyzed.