Documentation ¶
Index ¶
- Constants
- func AddDocsToIndex(docs []searchModel.DialogDocument, writer *bluge.Writer) error
- func DocumentsFromModel(episode *model.Audio) []searchModel.DialogDocument
- type BlugeSearch
- func (b *BlugeSearch) ClearEpisodeDialog(ctx context.Context, blugeWriter *bluge.Writer, mediaID string) error
- func (b *BlugeSearch) Get(ctx context.Context, id string) (*model.DialogDocument, error)
- func (b *BlugeSearch) Import(ctx context.Context, meta *metaModel.Audio, deleteFirst bool) error
- func (b *BlugeSearch) ListTerms(ctx context.Context, fieldName string) ([]string, error)
- func (b *BlugeSearch) RefreshIndex() error
- func (b *BlugeSearch) Search(ctx context.Context, f []searchterms.Term, overrides ...Override) ([]model.DialogDocument, error)
- type Override
- type Searcher
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 (*BlugeSearch) Get ¶
func (b *BlugeSearch) Get(ctx context.Context, id string) (*model.DialogDocument, 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)
Click to show internal directories.
Click to hide internal directories.