bleveengine

package
v6.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2022 License: AGPL-3.0, Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EngineName   = "bleve"
	PostIndex    = "posts"
	FileIndex    = "files"
	UserIndex    = "users"
	ChannelIndex = "channels"
)
View Source
const DeleteFilesBatchSize = 500
View Source
const DeletePostsBatchSize = 500

Variables

This section is empty.

Functions

This section is empty.

Types

type BLVChannel

type BLVChannel struct {
	Id            string
	Type          model.ChannelType
	UserIDs       []string
	TeamId        []string
	TeamMemberIDs []string
	NameSuggest   []string
}

func BLVChannelFromChannel

func BLVChannelFromChannel(channel *model.Channel, userIDs, teamMemberIDs []string) *BLVChannel

type BLVFile

type BLVFile struct {
	Id        string
	CreatorId string
	ChannelId string
	CreateAt  int64
	Name      string
	Content   string
	Extension string
}

func BLVFileFromFileForIndexing

func BLVFileFromFileForIndexing(file *model.FileForIndexing) *BLVFile

func BLVFileFromFileInfo

func BLVFileFromFileInfo(fileInfo *model.FileInfo, channelId string) *BLVFile

type BLVPost

type BLVPost struct {
	Id          string
	TeamId      string
	ChannelId   string
	UserId      string
	CreateAt    int64
	Message     string
	Type        string
	Hashtags    []string
	Attachments string
}

func BLVPostFromPost

func BLVPostFromPost(post *model.Post, teamId string) *BLVPost

func BLVPostFromPostForIndexing

func BLVPostFromPostForIndexing(post *model.PostForIndexing) *BLVPost

type BLVUser

type BLVUser struct {
	Id                         string
	SuggestionsWithFullname    []string
	SuggestionsWithoutFullname []string
	TeamsIds                   []string
	ChannelsIds                []string
}

func BLVUserFromUserAndTeams

func BLVUserFromUserAndTeams(user *model.User, teamsIds, channelsIds []string) *BLVUser

func BLVUserFromUserForIndexing

func BLVUserFromUserForIndexing(userForIndexing *model.UserForIndexing) *BLVUser

type BleveEngine

type BleveEngine struct {
	PostIndex    bleve.Index
	FileIndex    bleve.Index
	UserIndex    bleve.Index
	ChannelIndex bleve.Index
	Mutex        sync.RWMutex
	// contains filtered or unexported fields
}

func NewBleveEngine

func NewBleveEngine(cfg *model.Config) *BleveEngine

func (*BleveEngine) DataRetentionDeleteIndexes

func (b *BleveEngine) DataRetentionDeleteIndexes(cutoff time.Time) *model.AppError

func (*BleveEngine) DeleteChannel

func (b *BleveEngine) DeleteChannel(channel *model.Channel) *model.AppError

func (*BleveEngine) DeleteChannelPosts

func (b *BleveEngine) DeleteChannelPosts(channelID string) *model.AppError

func (*BleveEngine) DeleteFile

func (b *BleveEngine) DeleteFile(fileID string) *model.AppError

func (*BleveEngine) DeleteFilesBatch

func (b *BleveEngine) DeleteFilesBatch(endTime, limit int64) *model.AppError

func (*BleveEngine) DeletePost

func (b *BleveEngine) DeletePost(post *model.Post) *model.AppError

func (*BleveEngine) DeletePostFiles

func (b *BleveEngine) DeletePostFiles(postID string) *model.AppError

func (*BleveEngine) DeleteUser

func (b *BleveEngine) DeleteUser(user *model.User) *model.AppError

func (*BleveEngine) DeleteUserFiles

func (b *BleveEngine) DeleteUserFiles(userID string) *model.AppError

func (*BleveEngine) DeleteUserPosts

func (b *BleveEngine) DeleteUserPosts(userID string) *model.AppError

func (*BleveEngine) GetFullVersion

func (b *BleveEngine) GetFullVersion() string

func (*BleveEngine) GetName

func (b *BleveEngine) GetName() string

func (*BleveEngine) GetPlugins

func (b *BleveEngine) GetPlugins() []string

func (*BleveEngine) GetVersion

func (b *BleveEngine) GetVersion() int

func (*BleveEngine) IndexChannel

func (b *BleveEngine) IndexChannel(channel *model.Channel, userIDs, teamMemberIDs []string) *model.AppError

func (*BleveEngine) IndexFile

func (b *BleveEngine) IndexFile(file *model.FileInfo, channelId string) *model.AppError

func (*BleveEngine) IndexPost

func (b *BleveEngine) IndexPost(post *model.Post, teamId string) *model.AppError

func (*BleveEngine) IndexUser

func (b *BleveEngine) IndexUser(user *model.User, teamsIds, channelsIds []string) *model.AppError

func (*BleveEngine) IsActive

func (b *BleveEngine) IsActive() bool

func (*BleveEngine) IsAutocompletionEnabled

func (b *BleveEngine) IsAutocompletionEnabled() bool

func (*BleveEngine) IsIndexingEnabled

func (b *BleveEngine) IsIndexingEnabled() bool

func (*BleveEngine) IsIndexingSync

func (b *BleveEngine) IsIndexingSync() bool

func (*BleveEngine) IsSearchEnabled

func (b *BleveEngine) IsSearchEnabled() bool

func (*BleveEngine) PurgeIndexes

func (b *BleveEngine) PurgeIndexes() *model.AppError

func (*BleveEngine) RefreshIndexes

func (b *BleveEngine) RefreshIndexes() *model.AppError

func (*BleveEngine) SearchChannels

func (b *BleveEngine) SearchChannels(teamId, userID, term string, isGuest bool) ([]string, *model.AppError)

func (*BleveEngine) SearchFiles

func (b *BleveEngine) SearchFiles(channels model.ChannelList, searchParams []*model.SearchParams, page, perPage int) ([]string, *model.AppError)

func (*BleveEngine) SearchPosts

func (b *BleveEngine) SearchPosts(channels model.ChannelList, searchParams []*model.SearchParams, page, perPage int) ([]string, model.PostSearchMatches, *model.AppError)

func (*BleveEngine) SearchUsersInChannel

func (b *BleveEngine) SearchUsersInChannel(teamId, channelId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, []string, *model.AppError)

func (*BleveEngine) SearchUsersInTeam

func (b *BleveEngine) SearchUsersInTeam(teamId string, restrictedToChannels []string, term string, options *model.UserSearchOptions) ([]string, *model.AppError)

func (*BleveEngine) Start

func (b *BleveEngine) Start() *model.AppError

func (*BleveEngine) Stop

func (b *BleveEngine) Stop() *model.AppError

func (*BleveEngine) TestConfig

func (b *BleveEngine) TestConfig(cfg *model.Config) *model.AppError

func (*BleveEngine) UpdateConfig

func (b *BleveEngine) UpdateConfig(cfg *model.Config)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL