github.com/mattermosttest/mattermost-server/v5@v5.0.0-20200917143240-9dfa12e121f9/services/searchengine/interface.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See LICENSE.txt for license information. 3 4 package searchengine 5 6 import ( 7 "time" 8 9 "github.com/mattermost/mattermost-server/v5/model" 10 ) 11 12 type SearchEngineInterface interface { 13 Start() *model.AppError 14 Stop() *model.AppError 15 GetVersion() int 16 UpdateConfig(cfg *model.Config) 17 GetName() string 18 IsActive() bool 19 IsIndexingEnabled() bool 20 IsSearchEnabled() bool 21 IsAutocompletionEnabled() bool 22 IsIndexingSync() bool 23 IndexPost(post *model.Post, teamId string) *model.AppError 24 SearchPosts(channels *model.ChannelList, searchParams []*model.SearchParams, page, perPage int) ([]string, model.PostSearchMatches, *model.AppError) 25 DeletePost(post *model.Post) *model.AppError 26 DeleteChannelPosts(channelID string) *model.AppError 27 DeleteUserPosts(userID string) *model.AppError 28 IndexChannel(channel *model.Channel) *model.AppError 29 SearchChannels(teamId, term string) ([]string, *model.AppError) 30 DeleteChannel(channel *model.Channel) *model.AppError 31 IndexUser(user *model.User, teamsIds, channelsIds []string) *model.AppError 32 SearchUsersInChannel(teamId, channelId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, []string, *model.AppError) 33 SearchUsersInTeam(teamId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, *model.AppError) 34 DeleteUser(user *model.User) *model.AppError 35 TestConfig(cfg *model.Config) *model.AppError 36 PurgeIndexes() *model.AppError 37 RefreshIndexes() *model.AppError 38 DataRetentionDeleteIndexes(cutoff time.Time) *model.AppError 39 }