index_eval function

Obtain indices