Added index for SocialNetwork in java