Update indexer script to run indexer in a loop to refresh indexes.