Indicates that the annotated entity should have an index created on specified columns.
@Entity
@Table(indexes = {@Index(name = "phone_idx", columnList = "companyNumber")})
public class Phone {
@Id
@GeneratedValue
private Long id;
private String companyNumber;
}