Index definition switching skeleton code