debug doc_id_to_terms