index

package
v0.0.0-...-27f04c1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SEP = "\007"

Variables

This section is empty.

Functions

This section is empty.

Types

type DocIdKey

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

func DocId

func DocId(key document.DocId) *DocIdKey

func (*DocIdKey) PartitionKey

func (i *DocIdKey) PartitionKey() int64

func (*DocIdKey) Value

func (i *DocIdKey) Value() interface{}

type Index

type Index interface {
	Add(docInfo *document.DocInfo) error
	UpdateIds(fieldName string, ids []document.DocId)
	Delete(fieldName string)
	Del(docInfo *document.DocInfo)
	GetDataType(fieldName string) document.FieldType
	GetValueById(id document.DocId) [2]map[string][]string
	Dump(filename string) error
	Load(filename string) error
	DebugInfo() *debug.Debug
}

type Indexer

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

func NewIndex

func NewIndex(name string) (i *Indexer)

func (*Indexer) Add

func (i *Indexer) Add(doc *document.DocInfo) (err error)

func (*Indexer) DebugInfo

func (i *Indexer) DebugInfo() *debug.Debug

func (*Indexer) Del

func (i *Indexer) Del(doc *document.DocInfo)

func (*Indexer) Delete

func (i *Indexer) Delete(fieldName string)

func (*Indexer) Dump

func (i *Indexer) Dump(filename string) error

func (*Indexer) GetBitMap

func (i *Indexer) GetBitMap() *concurrent_map.ConcurrentMap

func (*Indexer) GetCampaignMap

func (i *Indexer) GetCampaignMap() *concurrent_map.ConcurrentMap

func (*Indexer) GetDataType

func (i *Indexer) GetDataType(fieldName string) document.FieldType

func (*Indexer) GetInvertedIndex

func (i *Indexer) GetInvertedIndex() InvertedIndex

func (*Indexer) GetName

func (i *Indexer) GetName() string

func (*Indexer) GetStorageIndex

func (i *Indexer) GetStorageIndex() StorageIndex

func (*Indexer) GetValueById

func (i *Indexer) GetValueById(id document.DocId) [2]map[string][]string

func (*Indexer) Load

func (i *Indexer) Load(filename string) error

func (*Indexer) SetDebug

func (i *Indexer) SetDebug(level int)

func (*Indexer) StringBuilder

func (i *Indexer) StringBuilder(cap int, value ...interface{}) string

func (*Indexer) Update

func (i *Indexer) Update(filename string) error

func (*Indexer) UpdateIds

func (i *Indexer) UpdateIds(fieldName string, ids []document.DocId)

func (*Indexer) WarnStatus

func (i *Indexer) WarnStatus(name string, value interface{}, err string)

type InvertedIndex

type InvertedIndex interface {
	Add(fieldName string, id document.DocId) error
	Del(fieldName string, id document.DocId) bool
	Update(fieldName string, ids []document.DocId)
	Delete(fieldName string)
	Iterator(name, value string) datastruct.Iterator
	Count() int
	GetValueById(id document.DocId) map[string][]string
	SetDebug(level int)
	DebugInfo() *debug.Debug
}

type InvertedIndexer

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

func NewInvertedIndexer

func NewInvertedIndexer() *InvertedIndexer

func (*InvertedIndexer) Add

func (i *InvertedIndexer) Add(fieldName string, id document.DocId) (err error)

func (*InvertedIndexer) Count

func (i *InvertedIndexer) Count() (count int)

func (*InvertedIndexer) DebugInfo

func (i *InvertedIndexer) DebugInfo() *debug.Debug

func (*InvertedIndexer) Del

func (i *InvertedIndexer) Del(fieldName string, id document.DocId) (ok bool)

func (*InvertedIndexer) Delete

func (i *InvertedIndexer) Delete(fieldName string)

func (*InvertedIndexer) GetValueById

func (i *InvertedIndexer) GetValueById(id document.DocId) map[string][]string

func (*InvertedIndexer) Iterator

func (i *InvertedIndexer) Iterator(name, value string) datastruct.Iterator

func (*InvertedIndexer) SetDebug

func (i *InvertedIndexer) SetDebug(level int)

func (*InvertedIndexer) Update

func (i *InvertedIndexer) Update(fieldName string, ids []document.DocId)

type StorageIndex

type StorageIndex interface {
	Get(filedName string, id document.DocId) interface{}
	Add(fieldName string, id document.DocId, value interface{}) error
	Del(fieldName string, id document.DocId) bool
	Iterator(fieldName string) datastruct.Iterator
	Count() int
	GetValueById(id document.DocId) map[string][]string
	SetDebug(level int)
	DebugInfo() *debug.Debug
}

type StorageIndexer

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

func NewStorageIndexer

func NewStorageIndexer() *StorageIndexer

func (*StorageIndexer) Add

func (s *StorageIndexer) Add(fieldName string, id document.DocId, value interface{}) (err error)

func (*StorageIndexer) Count

func (s *StorageIndexer) Count() (count int)

func (*StorageIndexer) DebugInfo

func (s *StorageIndexer) DebugInfo() *debug.Debug

func (*StorageIndexer) Del

func (s *StorageIndexer) Del(fieldName string, id document.DocId) (ok bool)

func (*StorageIndexer) Get

func (s *StorageIndexer) Get(fieldName string, id document.DocId) interface{}

func (*StorageIndexer) GetValueById

func (s *StorageIndexer) GetValueById(id document.DocId) map[string][]string

func (*StorageIndexer) Iterator

func (s *StorageIndexer) Iterator(fieldName string) datastruct.Iterator

func (*StorageIndexer) SetDebug

func (s *StorageIndexer) SetDebug(level int)

Jump to

Keyboard shortcuts

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