Only index when requested or it is necessary