test doc_to_vector