Adjusted exceptions thrown for search repository methods and changed helper to private