getAlphaIndex function added to retrieve the alphabetical index

@josenaranjo please review