refactor search service,change method to generics