Refactoring full text search