Factorization of the parse_tag_line function in index-search.