make add_index_ref able to reference any path for case_id
Merge pull request #1811 from dimagi/generic-index

make add_index_ref able to reference any path for case_id