* Show private channels in autocomplete This is supported in all Engines: MySQL, Postgres, Bleve, Elasticsearch. https://mattermost.atlassian.net/browse/MM-18496 ```release-note Private channels will now appear in channel autocomplete. If you are using Bleve or ElasticSearch, you will have to reindex the channels again to populate them with the new attributes. ``` A large chunk of this work has been based on the earlier effort at https://github.com/mattermost/mattermost-server/pull/17804. Full credit goes to https://github.com/arvinDarmawan. * Add comment ```release-note NONE ``` * Adding more tests ```release-note NONE ``` * fix more tests ```release-note NONE ``` * tmp ```release-note NONE ``` * more fixes ```release-note NONE ``` * add tests ```release-note NONE ``` * Add review comments from previous PR ```release-note NONE ``` * Add API to return all channels from all team ```release-note NONE ``` * Added support for bleve and ES ```release-note NONE ``` * Streaming response for GetAllChannels ```release-note NONE ``` * Fix tests ```release-note NONE ``` * Trigger CI ```release-note NONE ``` * fix tests ```release-note NONE ``` * Addressing review comments ```release-note NONE ``` * Fix lint ```release-note NONE ``` * Removing flaky test ```release-note NONE ``` * Address comments ```release-note NONE ``` * Trigger CI ```release-note NONE ``` * Added /users/<userid>/channel_members endpoint ```release-note NONE ``` * Minor edit ```release-note NONE ``` * Improve embedding ```release-note NONE ``` * Fix lint error ```release-note NONE ``` Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
50 строки
2.1 KiB
Go
50 строки
2.1 KiB
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package searchengine
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/mattermost/mattermost-server/v6/model"
|
|
)
|
|
|
|
type SearchEngineInterface interface {
|
|
Start() *model.AppError
|
|
Stop() *model.AppError
|
|
GetFullVersion() string
|
|
GetVersion() int
|
|
GetPlugins() []string
|
|
UpdateConfig(cfg *model.Config)
|
|
GetName() string
|
|
IsActive() bool
|
|
IsIndexingEnabled() bool
|
|
IsSearchEnabled() bool
|
|
IsAutocompletionEnabled() bool
|
|
IsIndexingSync() bool
|
|
IndexPost(post *model.Post, teamId string) *model.AppError
|
|
SearchPosts(channels model.ChannelList, searchParams []*model.SearchParams, page, perPage int) ([]string, model.PostSearchMatches, *model.AppError)
|
|
DeletePost(post *model.Post) *model.AppError
|
|
DeleteChannelPosts(channelID string) *model.AppError
|
|
DeleteUserPosts(userID string) *model.AppError
|
|
// IndexChannel indexes a given channel. The userIDs are only populated
|
|
// for private channels.
|
|
IndexChannel(channel *model.Channel, userIDs, teamMemberIDs []string) *model.AppError
|
|
SearchChannels(teamId, userID, term string) ([]string, *model.AppError)
|
|
DeleteChannel(channel *model.Channel) *model.AppError
|
|
IndexUser(user *model.User, teamsIds, channelsIds []string) *model.AppError
|
|
SearchUsersInChannel(teamId, channelId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, []string, *model.AppError)
|
|
SearchUsersInTeam(teamId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, *model.AppError)
|
|
DeleteUser(user *model.User) *model.AppError
|
|
IndexFile(file *model.FileInfo, channelId string) *model.AppError
|
|
SearchFiles(channels model.ChannelList, searchParams []*model.SearchParams, page, perPage int) ([]string, *model.AppError)
|
|
DeleteFile(fileID string) *model.AppError
|
|
DeletePostFiles(postID string) *model.AppError
|
|
DeleteUserFiles(userID string) *model.AppError
|
|
DeleteFilesBatch(endTime, limit int64) *model.AppError
|
|
TestConfig(cfg *model.Config) *model.AppError
|
|
PurgeIndexes() *model.AppError
|
|
RefreshIndexes() *model.AppError
|
|
DataRetentionDeleteIndexes(cutoff time.Time) *model.AppError
|
|
}
|