Documentation ¶
Index ¶
- type Index
- type IndexBuilder
- type MemoryIndex
- func (mi *MemoryIndex) Document(index int) entities.Doc
- func (mi *MemoryIndex) Indexed(key string) (data []int)
- func (mi *MemoryIndex) Len() int
- func (mi *MemoryIndex) Put(payload indexable) Index
- func (mi *MemoryIndex) Search(payload string, engine search.Engine) entities.Iterator
- func (mi *MemoryIndex) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexBuilder ¶
func NewMemoryIndexBuilder ¶
func NewMemoryIndexBuilder(tokenizer tokenizer) IndexBuilder
type MemoryIndex ¶
type MemoryIndex struct { Docs []entities.Doc `json:"indexed"` InvertedIndex map[string][]int `json:"inverted"` // contains filtered or unexported fields }
func NewMemoryIndex ¶
func NewMemoryIndex(name string, tkr tokenizer) *MemoryIndex
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) String ¶
func (mi *MemoryIndex) String() string
Click to show internal directories.
Click to hide internal directories.