Added support for non-alphanumeric characters in retrieving documents by id