Move index id logic to index class
Move index id logic to index class

Probably should've done this in the first place

dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq