search

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package search provides a wrapper for bleve search, building a search database for an index of fields.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IndexDir string
}

type FieldMap

type FieldMap map[string]interface{}

func AddField

func AddField(fields FieldMap, key string, value interface{}) FieldMap

func CloneFields

func CloneFields(fields FieldMap) FieldMap

type IndexMap

type IndexMap map[string]FieldMap

type Searcher added in v0.14.0

type Searcher interface {
	Open(name string, keywords []string) error
	Index(m IndexMap)
	Search(q string, limit int) ([]string, error)
	Delete(keys []string) error
	Close()
}

func NewSearcher added in v0.14.0

func NewSearcher(config Config) Searcher

Jump to

Keyboard shortcuts

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