Refactoring, modify rebuild index command.