Adding get_match_index method.