Sorting text fields case insensitive

Hi,

using ES 5.2.2 I am trying to create a schema that allows me to sort by text fields:

"project_name" : {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"normalizer" : "lowerasciinormalizer"
}
}
},
with
"normalizer": {
"lowerasciinormalizer": {
"type": "custom",
"filter": [ "lowercase", "asciifolding" ]
}
},

a) I notice that when I do not specify the normalizer, I can sort (case sensitive). When I specify the normalizer I can not sort at all! So, what can I do to get the normalizer to work and be able to sort case insensitive?

b) I noticed that when I call the field "raw" instead of "keyword", sorting also does not work. I am surprised as I would have thought that I can name it whatever I want, as long as I specify "type": "keyword" !?

Can you send a full script to reproduce your issue?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.