engine

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocumentsFromMessages added in v0.18.0

func DocumentsFromMessages(ctx context.Context,
	messages []*tg.Message,
	chatID, self int64,
	ectx *ext.Context,
	enableOcr bool) []*types.MessageDocument

Types

type Searcher added in v0.18.0

type Searcher interface {
	CreateIndex(ctx context.Context, chatID int64) error
	DeleteIndex(ctx context.Context, chatID int64) error
	AddDocuments(ctx context.Context, chatID int64, docs []*types.MessageDocument) error
	DeleteDocuments(ctx context.Context, chatID int64, messageIds []int) error
	Search(ctx context.Context, req types.SearchRequest) (*types.SearchResponse, error)
	GetDocuments(ctx context.Context, chatID int64, messageIds []int) ([]*types.MessageDocument, error)
}

func GetEngine added in v0.12.0

func GetEngine() Searcher

func NewEngine

func NewEngine(ctx context.Context) (Searcher, error)

selfID is the userclient's telegram id

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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