In order use rating to sort on inside search api, i'm trying to store the fivestar decimal value inside another field that can be indexed. This is because Fivestar doesn't play nice with search_api, so this will be a workaround.
I have a computed field that performs different tasks on the node such as copying the field_review_votes_average to field_index_review_score. I'm using this code to do so.
$entity->field_index_review_score[LANGUAGE_NONE]['value'] = $entity->field_review_votes_average[LANGUAGE_NONE]['average'];
But I keep getting Notice: Undefined index: und, what code can I use to to retrieve the average score?