dynamically generate index

[#70413506]