From 0db5e3922fd5045b3f7f518ad65e42138f0325c4 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Thu, 18 May 2017 16:26:52 +0100 Subject: PLT-6472: Basic Elastic Search implementation. (#6382) * PLT-6472: Basic Elastic Search implementation. This currently supports indexing of posts at create/update/delete time. It does not support batch indexing or reindexing, and does not support any entities other than posts yet. The purpose is to more-or-less replicate the existing full-text search feature but with some of the immediate benefits of using elastic search. * Alter settings for AWS compatability. * Remove unneeded i18n strings. --- einterfaces/elasticsearch.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 einterfaces/elasticsearch.go (limited to 'einterfaces/elasticsearch.go') diff --git a/einterfaces/elasticsearch.go b/einterfaces/elasticsearch.go new file mode 100644 index 000000000..61e1d532f --- /dev/null +++ b/einterfaces/elasticsearch.go @@ -0,0 +1,23 @@ +// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package einterfaces + +import "github.com/mattermost/platform/model" + +type ElasticSearchInterface interface { + Start() *model.AppError + IndexPost(post *model.Post, teamId string) + SearchPosts(channels *model.ChannelList, searchParams []*model.SearchParams) ([]string, *model.AppError) + DeletePost(postId string) +} + +var theElasticSearchInterface ElasticSearchInterface + +func RegisterElasticSearchInterface(newInterface ElasticSearchInterface) { + theElasticSearchInterface = newInterface +} + +func GetElasticSearchInterface() ElasticSearchInterface { + return theElasticSearchInterface +} -- cgit v1.2.3-1-g7c22