se

package
v0.0.0-...-afb99dd Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer func(in string) (out string)

type ChainAnalyzer

type ChainAnalyzer func(analyzer Analyzer) Analyzer

type Cursor

type Cursor interface {
	Next() (string, error)
	Close() error
}

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(store Store) *Engine

func (*Engine) CreateNumberMapping

func (e *Engine) CreateNumberMapping(m *pb.NumberMapping) error

func (*Engine) CreatePropertiesMapping

func (e *Engine) CreatePropertiesMapping(mapping *pb.PropertiesMapping) error

func (*Engine) CreateTextMapping

func (e *Engine) CreateTextMapping(mapping *pb.TextMapping) error

func (*Engine) DeleteObjectMappings

func (e *Engine) DeleteObjectMappings(id string) error

func (*Engine) Feed

func (e *Engine) Feed(msg *pb.MessageFeed) error

func (*Engine) Search

func (e *Engine) Search(query *pb.SearchQuery) ([]string, error)

type Store

type Store interface {
	SaveWordMapping(word string, id string) error
	SaveNumberMapping(num int64, id string) error
	SavePropertiesMapping(id string, value string) error
	Search(query *pb.SearchQuery) (Cursor, error)
	DeleteObjectMappings(id string) error
}

func NewSQLIndexStore

func NewSQLIndexStore(db *sql.DB, dialect string, tablePrefix string) (Store, error)

type TextTokenizer

type TextTokenizer interface {
	TokenizeText(text string, originalMappedCount uint32) TokenStream
}

type TokenStream

type TokenStream interface {
	Flip()
	Next() string
}

Jump to

Keyboard shortcuts

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