index

package
v0.0.1-alpha4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index interface {
	Put(Doc Indexable) Index
	Search(terms string, engine search.Engine) entities.Iterator
}

type Indexable

type Indexable interface {
	ID() string
	Raw() string // The original content of the payload
	Mime() entities.MimeType
	Statement() string
}

type MemoryIndex

type MemoryIndex struct {
	L         sync.RWMutex
	Name      string
	Tokenizer visigoth.Tokenizer
	// contains filtered or unexported fields
}

func NewMemoryIndex

func NewMemoryIndex(name string, tkr visigoth.Tokenizer) *MemoryIndex

func (*MemoryIndex) Document

func (mi *MemoryIndex) Document(index int) entities.Doc

func (*MemoryIndex) Indexed

func (mi *MemoryIndex) Indexed(key string) (data []int)

func (*MemoryIndex) Len

func (mi *MemoryIndex) Len() int

func (*MemoryIndex) Put

func (mi *MemoryIndex) Put(payload Indexable) Index

func (*MemoryIndex) Search

func (mi *MemoryIndex) Search(payload string, engine search.Engine) entities.Iterator

func (*MemoryIndex) String

func (mi *MemoryIndex) String() string

Jump to

Keyboard shortcuts

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