Correct advanced sort of the SearchDoc