Instead of using alternative locale option, I want to write a rules parameter to customise the sort behaviour with alphabets having atmost precedence.
for the text values, $1232, Abi, £7232, 87343, Karthik
I want the collation rule, with the following sort order
Abi
Karthik
$1232
£7232
87343
So far i have tried with the following mapping
PUT my-index-000001
{
"mappings": {
"properties": {
"name": {
"type": "text",
"fields": {
"sort": {
"type": "icu_collation_keyword",
"index": false,
"language" : "en"
}
}
}
}
}
}
the above locale option (language) instead of rules option, sorts in the following order
$1232
£7232
87343
Abi
Karthik
Can someone please let me know how to write a collation rule, so that the alphabets have the precedence above all other
alphabets -> space -> punctuation -> symbol -> currency -> digits -> others
Thanks in advance.