From ff0a7905166e29ecf9404fa90d23af7863885384 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Thu, 27 Jul 2017 08:48:02 +0100 Subject: PLT-7040: Fix capitalisation of Elasticsearch in Config. (#7020) --- app/post.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/post.go') diff --git a/app/post.go b/app/post.go index 447fef6bb..99626c41f 100644 --- a/app/post.go +++ b/app/post.go @@ -100,7 +100,7 @@ func CreatePost(post *model.Post, teamId string, triggerWebhooks bool) (*model.P } esInterface := einterfaces.GetElasticsearchInterface() - if esInterface != nil && *utils.Cfg.ElasticSearchSettings.EnableIndexing { + if esInterface != nil && *utils.Cfg.ElasticsearchSettings.EnableIndexing { go esInterface.IndexPost(rpost, teamId) } @@ -285,10 +285,10 @@ func UpdatePost(post *model.Post, safeUpdate bool) (*model.Post, *model.AppError rpost := result.Data.(*model.Post) esInterface := einterfaces.GetElasticsearchInterface() - if esInterface != nil && *utils.Cfg.ElasticSearchSettings.EnableIndexing { + if esInterface != nil && *utils.Cfg.ElasticsearchSettings.EnableIndexing { go func() { if rchannel := <-Srv.Store.Channel().GetForPost(rpost.Id); rchannel.Err != nil { - l4g.Error("Couldn't get channel %v for post %v for ElasticSearch indexing.", rpost.ChannelId, rpost.Id) + l4g.Error("Couldn't get channel %v for post %v for Elasticsearch indexing.", rpost.ChannelId, rpost.Id) } else { esInterface.IndexPost(rpost, rchannel.Data.(*model.Channel).TeamId) } @@ -472,7 +472,7 @@ func DeletePost(postId string) (*model.Post, *model.AppError) { go DeleteFlaggedPosts(post.Id) esInterface := einterfaces.GetElasticsearchInterface() - if esInterface != nil && *utils.Cfg.ElasticSearchSettings.EnableIndexing { + if esInterface != nil && *utils.Cfg.ElasticsearchSettings.EnableIndexing { go esInterface.DeletePost(post) } @@ -503,7 +503,7 @@ func SearchPostsInTeam(terms string, userId string, teamId string, isOrSearch bo paramsList := model.ParseSearchParams(terms) esInterface := einterfaces.GetElasticsearchInterface() - if esInterface != nil && *utils.Cfg.ElasticSearchSettings.EnableSearching && utils.IsLicensed && *utils.License.Features.Elasticsearch { + if esInterface != nil && *utils.Cfg.ElasticsearchSettings.EnableSearching && utils.IsLicensed && *utils.License.Features.Elasticsearch { finalParamsList := []*model.SearchParams{} for _, params := range paramsList { -- cgit v1.2.3-1-g7c22