Doc values are disk-based and consume little memory at runtime. So sorting anything except analyzed text fields will use doc values and not consume much memory.
Text fields continue to need in-memory field data for sorting, which can be expensive. In that case, smaller/lower-"cardinality" text fields will consume less memory. E.g. analyzed strings of full text will consume less memory than unique alpha-numeric identifiers.
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.