search

package
v0.0.0-...-9ecbf35 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPageSize = 10
)

Variables

This section is empty.

Functions

func AddDocsToIndex

func AddDocsToIndex(docs []searchModel.DialogDocument, writer *bluge.Writer) error

func DocumentsFromModel

func DocumentsFromModel(episode *model.Audio) []searchModel.DialogDocument

Types

type BlugeSearch

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

func NewBlugeSearch

func NewBlugeSearch(indexPath string) (*BlugeSearch, error)

func (*BlugeSearch) ClearEpisodeDialog

func (b *BlugeSearch) ClearEpisodeDialog(ctx context.Context, blugeWriter *bluge.Writer, mediaID string) error

func (*BlugeSearch) Get

func (*BlugeSearch) Import

func (b *BlugeSearch) Import(ctx context.Context, meta *metaModel.Audio, deleteFirst bool) error

func (*BlugeSearch) ListTerms

func (b *BlugeSearch) ListTerms(ctx context.Context, fieldName string) ([]string, error)

func (*BlugeSearch) RefreshIndex

func (b *BlugeSearch) RefreshIndex() error

func (*BlugeSearch) Search

func (b *BlugeSearch) Search(ctx context.Context, f []searchterms.Term, overrides ...Override) ([]model.DialogDocument, error)

type Override

type Override func(overrides *searchOverrides)

func OverridePageSize

func OverridePageSize(pageSize int) Override

type Searcher

type Searcher interface {
	Search(ctx context.Context, f []searchterms.Term, overrides ...Override) ([]model.DialogDocument, error)
	Get(ctx context.Context, id string) (*model.DialogDocument, error)
	ListTerms(ctx context.Context, field string) ([]string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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