search

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChannelIndexEvent = "sys-fts"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexDocument

type IndexDocument struct {
	ID     string `json:"id"`
	DBName string `json:"dbname"`
	Key    string `json:"key"`
	Text   string `json:"text"`
}
type Search struct {
	// contains filtered or unexported fields
}

func New

func New(filename string, pubsub cache.Volatilizer) (*Search, error)

func (*Search) Close

func (s *Search) Close()

func (*Search) Index

func (s *Search) Index(dbName, col, id, text string) error

func (*Search) Search

func (s *Search) Search(dbName, col, keywords string) (SearchResult, error)

type SearchResult

type SearchResult struct {
	DBName string
	Col    string
	IDs    []string
}

Jump to

Keyboard shortcuts

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