Refatorando index_search