bleveengine

package
v0.0.0-...-8575daa Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: AGPL-3.0, Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENGINE_NAME   = "bleve"
	POST_INDEX    = "posts"
	USER_INDEX    = "users"
	CHANNEL_INDEX = "channels"
)
View Source
const DELETE_POSTS_BATCH_SIZE = 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 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
	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

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

func (*BleveEngine) DeletePost

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

func (*BleveEngine) DeleteUser

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

func (*BleveEngine) DeleteUserPosts

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

func (*BleveEngine) GetName

func (b *BleveEngine) GetName() string

func (*BleveEngine) GetVersion

func (b *BleveEngine) GetVersion() int

func (*BleveEngine) IndexChannel

func (b *BleveEngine) IndexChannel(channel *model.Channel) *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) 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