make add_index_ref able to reference any path for case_id