Adds sorting by document type