A better way to manage indices for Doc Categories?

Maybe you want to take a look at this. Perhaps it is not the complete solution but can solve some of the issues into your use-case: