Fixed getDocumentByStringQuery method