index

package
v0.0.0-...-b472cd4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All() map[string]*Index

func Create

func Create(name string, defaultLang string, mapping models.IndexMapping) error

func Drop

func Drop(name string) error

func Load

func Load(basePath string) error

Types

type Index

type Index struct {
	// contains filtered or unexported fields
}

func Get

func Get(name string) *Index

func (*Index) Batch

func (ix *Index) Batch(idField string, items []map[string]any) error

func (*Index) DeleteDocument

func (ix *Index) DeleteDocument(id string) error

func (*Index) GetDocument

func (ix *Index) GetDocument(id string) (any, error)

func (*Index) GetStats

func (ix *Index) GetStats() map[string]any

func (*Index) IndexDocument

func (ix *Index) IndexDocument(id string, doc any) error

func (*Index) Search

func (ix *Index) Search(req *models.SearchReq) ([]any, uint64, error)

Jump to

Keyboard shortcuts

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