In Elasticsearch 6.0, a feature called index sorting was introduced, allowing documents to be sorted by specified keys during indexing, which can enhance search performance and reduce disk space usage. By pre-sorting documents, Elasticsearch can bypass sorting during query time, leading to faster query responses, especially when sorting by the same keys. This method can also improve query performance by enabling Elasticsearch to skip non-matching document blocks efficiently. Additionally, when values are sorted and repeated, compression becomes more effective, resulting in significant disk space savings; the extent of these savings depends on the field cardinality and can vary greatly. However, enabling index sorting comes with a trade-off, as it may slow down indexing speed by up to 40-50%, making it unsuitable for high-volume indexing scenarios. It is most beneficial for use cases with lower indexing rates, where query speed is prioritized, and regular reindexing is feasible.