This ajax call should be in the SearchService, and should use $http