How does actually Elasticsearch perform sorting under the hood for shard and for index? I can find it neither in documentation or books.
I am going to use a sliced scroll with sort but in some cases, I have to sort the whole shard. I think it will work but I cannot confirm this.
Do you have a best practice for reading a big number of documents with sorting?