search

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 11 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"`
	Fields map[string]string `json:"fields,omitempty"`
}

func (IndexDocument) Type added in v1.7.0

func (IndexDocument) Type() string
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) Delete added in v1.7.0

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

func (*Search) Index

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

func (*Search) IndexFields added in v1.7.0

func (s *Search) IndexFields(dbName, col, id string, fields map[string]string) error

func (*Search) PublishIndex added in v1.7.0

func (s *Search) PublishIndex(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