added function to get document types in the query string