add index for discriminator field.