Use update_index instead of generate_index when possible