bleveengine

package
v5.33.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: AGPL-3.0, Apache-2.0 Imports: 17 Imported by: 6

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
	TeamId      []string
	NameSuggest []string
}

func BLVChannelFromChannel

func BLVChannelFromChannel(channel *model.Channel) *BLVChannel

type BLVFile added in v5.32.0

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

func BLVFileFromFileForIndexing added in v5.32.0

func BLVFileFromFileForIndexing(file *model.FileForIndexing) *BLVFile

func BLVFileFromFileInfo added in v5.32.0

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, jobServer *jobs.JobServer) *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 added in v5.26.0

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

func (*BleveEngine) DeleteFile added in v5.32.0

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

func (*BleveEngine) DeleteFilesBatch added in v5.32.0

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

func (*BleveEngine) DeletePost

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

func (*BleveEngine) DeletePostFiles added in v5.32.0

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

func (*BleveEngine) DeleteUser

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

func (*BleveEngine) DeleteUserFiles added in v5.32.0

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

func (*BleveEngine) DeleteUserPosts added in v5.26.0

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

func (*BleveEngine) GetFullVersion added in v5.33.0

func (b *BleveEngine) GetFullVersion() string

func (*BleveEngine) GetName

func (b *BleveEngine) GetName() string

func (*BleveEngine) GetPlugins added in v5.33.0

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

func (*BleveEngine) GetVersion

func (b *BleveEngine) GetVersion() int

func (*BleveEngine) IndexChannel

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

func (*BleveEngine) IndexFile added in v5.32.0

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, term string) ([]string, *model.AppError)

func (*BleveEngine) SearchFiles added in v5.32.0

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