How to sort a text field alphabetically, ignoring the special characters & numbers? By default, the special characters come first followed by numbers and alphabets.
What I need is alphabets should be sorted and appear first, followed by numbers and special characters. Is that even possible in ES 6.3?
I've tried with the custom analyzer to replace all non-alphabetical characters but it didn't work:
{
"analysis": {
"analyzer": {
"alphabets_analyzer": {
"tokenizer": "standard",
"type": "keyword",
"char_filter": [
"alphabets_char_filter"
]
}
},
"char_filter": {
"alphabets_char_filter": {
"type": "pattern_replace",
"pattern": "[^a-zA-Z\\s\\.]",
"replacement": ""
}
}
}
}