Strings are sorted based on lexicographical order. If you look at the ASCII table upper and lower case characters are arranged in separate blocks meaning that a lower case character is always considered higher than an upper case character. What you are seeing is therefore expected. To get it sorted the way you want, which is basically a case-insensitive sort, you may need to create a lower cased subfield (or create a custom analyzer for the keyword field) to sort by, although there may be other solutions I am not aware of.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.