In your previous post about ordering the tags, I believe the answer was you'd need to have the source code to make this modification.
Regarding ordering by related document, if you are doing this via the API, you can simply take the results in a dataset and reorder them. I don't know of a way to do this with out of the box webparts. You could create your own webpart using the standard repeater and then perform your ordering within there using the API if you plan to use it more than one place.
Good luck!