lucene index files are binary.. hexdump cannot really print something useful, you need to write code to read the index from the directory. then loop through the term and get the frequency from the index reader object.
I haven't used it for a while but Luke used to be a good UI app for inspecting Lucene indices and the seems to support inspecting Elasticsearch indices now too.
Disclaimer: I have not run Luke since it was hosted on Google Code.
IMPORTANT: I would definitely copy the indices to a new folder (outside of you ES directory) and point Luke at that copy to make sure it doesn't corrupt the index somehow.
I don't know if this solution is the "right way to do it in general but it will work. And teach you some things.
You probably want to be careful of that new String call there - I don't think it'll work properly. I'd go with BytesRef.utf8ToString or UnicodeUtil.UTF8toUTF16.
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.