As you have a lot of documents, manually sorting will take too long on the fly.
What I suggest is that you have two views - essentially the same, but with different sorting.
Then create your own sort button, and the sort button tells the inner repeat to look at the 2nd view rather than the first.