docvalues are sorted to allowed improved compression. If you want the original order, you either need to use _source, or encode the values into a separate field that you can decode in scripting.
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.