implements order by in documents-view