The keyword subfield is a string so values are sorted as strings, not integers. When you sort strings you compare a character at a time, so "8" > "4" > "10", so the sorting output you are seeing is the expected one.
Thanks for you response. This makes sense now.
Is there a way to sort multiple fields(combination of keyword and integers) in such a way that keyword is cast to integer (or any other way that you suggest) while sorting and achieve the desired output.
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.