SearchRestService.search method refactored to be better extensible