Search text refactoring