diff --git a/kallithea/controllers/search.py b/kallithea/controllers/search.py --- a/kallithea/controllers/search.py +++ b/kallithea/controllers/search.py @@ -136,10 +136,8 @@ class SearchController(BaseRepoControlle c.runtime = _('Invalid search query. Try quoting it.') searcher.close() except EmptyIndexError: - log.error(traceback.format_exc()) - log.error('Empty Index data') - c.runtime = _('There is no index to search in. ' - 'Please run whoosh indexer') + log.error("Empty search index - run 'kallithea-cli index-create' regularly") + c.runtime = _('The server has no search index.') except Exception: log.error(traceback.format_exc()) c.runtime = _('An error occurred during search operation.') diff --git a/kallithea/tests/functional/test_search.py b/kallithea/tests/functional/test_search.py --- a/kallithea/tests/functional/test_search.py +++ b/kallithea/tests/functional/test_search.py @@ -24,8 +24,7 @@ class TestSearchController(TestControlle with mock.patch('kallithea.controllers.search.config', config_mock): response = self.app.get(url(controller='search', action='index'), {'q': HG_REPO}) - response.mustcontain('There is no index to search in. ' - 'Please run whoosh indexer') + response.mustcontain('The server has no search index.') def test_normal_search(self): self.log_user()