search service refactor