mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* 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.
24 lines
694 B
Go
24 lines
694 B
Go
// 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
|
|
}
|