diff --git a/app/file_test.go b/app/file_test.go index 628a912e9e..d234e5eb83 100644 --- a/app/file_test.go +++ b/app/file_test.go @@ -442,7 +442,6 @@ func TestSearchFilesInTeamForUser(t *testing.T) { es := &mocks.SearchEngineInterface{} es.On("SearchFiles", mock.Anything, mock.Anything, page, perPage).Return(resultsPage, nil) - es.On("GetName").Return("mock") es.On("Start").Return(nil).Maybe() es.On("IsActive").Return(true) es.On("IsSearchEnabled").Return(true) @@ -471,7 +470,6 @@ func TestSearchFilesInTeamForUser(t *testing.T) { es := &mocks.SearchEngineInterface{} es.On("SearchFiles", mock.Anything, mock.Anything, page, perPage).Return(resultsPage, nil) - es.On("GetName").Return("mock") es.On("Start").Return(nil).Maybe() es.On("IsActive").Return(true) es.On("IsSearchEnabled").Return(true) diff --git a/app/post_test.go b/app/post_test.go index 9a4a2857b2..dea533d0b8 100644 --- a/app/post_test.go +++ b/app/post_test.go @@ -1464,7 +1464,6 @@ func TestSearchPostsForUser(t *testing.T) { es := &mocks.SearchEngineInterface{} es.On("SearchPosts", mock.Anything, mock.Anything, page, perPage).Return(resultsPage, nil, nil) - es.On("GetName").Return("mock") es.On("Start").Return(nil).Maybe() es.On("IsActive").Return(true) es.On("IsSearchEnabled").Return(true) @@ -1492,7 +1491,6 @@ func TestSearchPostsForUser(t *testing.T) { es := &mocks.SearchEngineInterface{} es.On("SearchPosts", mock.Anything, mock.Anything, page, perPage).Return(resultsPage, nil, nil) - es.On("GetName").Return("mock") es.On("Start").Return(nil).Maybe() es.On("IsActive").Return(true) es.On("IsSearchEnabled").Return(true) diff --git a/i18n/en.json b/i18n/en.json index 5f3a1d4a73..e2fc1c52bb 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -7243,10 +7243,6 @@ "id": "ent.elasticsearch.stop.already_stopped.app_error", "translation": "Elasticsearch is already stopped." }, - { - "id": "ent.elasticsearch.test_config.connect_failed", - "translation": "Connecting to Elasticsearch server failed." - }, { "id": "ent.elasticsearch.test_config.indexing_disabled.error", "translation": "Elasticsearch is disabled." diff --git a/store/searchlayer/file_info_layer.go b/store/searchlayer/file_info_layer.go index 8c5d186d18..29431bee85 100644 --- a/store/searchlayer/file_info_layer.go +++ b/store/searchlayer/file_info_layer.go @@ -32,7 +32,6 @@ func (s SearchFileInfoStore) indexFile(file *model.FileInfo) { mlog.Error("Encountered error indexing file", mlog.String("file_info_id", file.Id), mlog.String("search_engine", engineCopy.GetName()), mlog.Err(err)) return } - mlog.Debug("Indexed file in search engine", mlog.String("search_engine", engineCopy.GetName()), mlog.String("file_info_id", file.Id)) }) } } @@ -46,7 +45,6 @@ func (s SearchFileInfoStore) deleteFileIndex(fileID string) { mlog.Error("Encountered error deleting file", mlog.String("file_info_id", fileID), mlog.String("search_engine", engineCopy.GetName()), mlog.Err(err)) return } - mlog.Debug("Removed file from the index in search engine", mlog.String("search_engine", engineCopy.GetName()), mlog.String("file_info_id", fileID)) }) } } @@ -172,7 +170,6 @@ func (s SearchFileInfoStore) Search(paramsList []*model.SearchParams, userId, te mlog.Error("Encountered error on Search.", mlog.String("search_engine", engine.GetName()), mlog.Err(appErr)) continue } - mlog.Debug("Using the first available search engine", mlog.String("search_engine", engine.GetName())) // Get the files filesList := model.NewFileInfoList() @@ -191,10 +188,8 @@ func (s SearchFileInfoStore) Search(paramsList []*model.SearchParams, userId, te } if *s.rootStore.getConfig().SqlSettings.DisableDatabaseSearch { - mlog.Debug("Returning empty results for file Search as the database search is disabled") return model.NewFileInfoList(), nil } - mlog.Debug("Using database search because no other search engine is available") return s.FileInfoStore.Search(paramsList, userId, teamId, page, perPage) } diff --git a/store/searchlayer/post_layer.go b/store/searchlayer/post_layer.go index 26ca41ef68..9590fe3cfb 100644 --- a/store/searchlayer/post_layer.go +++ b/store/searchlayer/post_layer.go @@ -32,7 +32,6 @@ func (s SearchPostStore) indexPost(post *model.Post) { mlog.Warn("Encountered error indexing post", mlog.String("post_id", post.Id), mlog.String("search_engine", engineCopy.GetName()), mlog.Err(err)) return } - mlog.Debug("Indexed post in search engine", mlog.String("search_engine", engineCopy.GetName()), mlog.String("post_id", post.Id)) }) } } @@ -46,7 +45,6 @@ func (s SearchPostStore) deletePostIndex(post *model.Post) { mlog.Warn("Encountered error deleting post", mlog.String("post_id", post.Id), mlog.String("search_engine", engineCopy.GetName()), mlog.Err(err)) return } - mlog.Debug("Removed post from the index in search engine", mlog.String("search_engine", engineCopy.GetName()), mlog.String("post_id", post.Id)) }) } } @@ -185,16 +183,13 @@ func (s SearchPostStore) SearchPostsForUser(paramsList []*model.SearchParams, us mlog.Warn("Encountered error on SearchPostsInTeamForUser.", mlog.String("search_engine", engine.GetName()), mlog.Err(err)) continue } - mlog.Debug("Using the first available search engine", mlog.String("search_engine", engine.GetName())) return results, err } } if *s.rootStore.getConfig().SqlSettings.DisableDatabaseSearch { - mlog.Debug("Returning empty results for post SearchPostsInTeam as the database search is disabled") return &model.PostSearchResults{PostList: model.NewPostList(), Matches: model.PostSearchMatches{}}, nil } - mlog.Debug("Using database search because no other search engine is available") return s.PostStore.SearchPostsForUser(paramsList, userId, teamId, page, perPage) }