search

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 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 {
	BleveDir 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 Search struct {
	Keywords []string
	// contains filtered or unexported fields
}

func NewSearch

func NewSearch(config Config) *Search

func (*Search) Close

func (s *Search) Close()

func (*Search) Delete

func (s *Search) Delete(keys []string) error

func (*Search) Index

func (s *Search) Index(m IndexMap)

func (*Search) Open

func (s *Search) Open(name string) error

func (*Search) Search

func (s *Search) Search(q string, limit int) ([]string, error)

see https://blevesearch.com/docs/Query-String-Query/

Jump to

Keyboard shortcuts

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