Documentation ¶
Index ¶
- Variables
- func DocKey(docID string) []byte
- func EntryKey(field string, ttype TermType, term []byte, docid string) []byte
- func EntryPrefix(field string) []byte
- func EntryTypePrefix(field string, ttype TermType) []byte
- func EntryValuePrefix(field string, ttype TermType, term []byte) []byte
- func FieldKey(field string) []byte
- func FieldKeyParse(key []byte) string
- func FieldPrefix() []byte
- func GetBytesTerm(val []byte, ttype TermType) interface{}
- func TermKey(field string, ttype TermType, term []byte) []byte
- func TermPrefix(field string) []byte
- func TermTypePrefix(field string, ttype TermType) []byte
- type Doc
- type KVIndex
- func (idx *KVIndex) AddDoc(docID string, value map[string]interface{}) error
- func (idx *KVIndex) AddDocTx(tx kvi.KVBulkWrite, docID string, doc map[string]interface{}) error
- func (idx *KVIndex) AddField(path string) error
- func (idx *KVIndex) FieldNumbers(field string) chan float64
- func (idx *KVIndex) FieldStringTermCounts(field string) chan KVTermCount
- func (idx *KVIndex) FieldTermCounts(field string) chan KVTermCount
- func (idx *KVIndex) FieldTermNumberMax(field string) float64
- func (idx *KVIndex) FieldTermNumberMin(field string) float64
- func (idx *KVIndex) FieldTermNumberRange(field string, min, max float64) chan KVTermCount
- func (idx *KVIndex) FieldTerms(field string) chan interface{}
- func (idx *KVIndex) GetTermMatch(ctx context.Context, field string, value interface{}, maxCount int) chan string
- func (idx *KVIndex) ListFields() []string
- func (idx *KVIndex) RemoveDoc(docID string) error
- func (idx *KVIndex) RemoveField(path string) error
- type KVTermCount
- type TermType
Constants ¶
This section is empty.
Variables ¶
var File_index_proto protoreflect.FileDescriptor
Functions ¶
func EntryPrefix ¶
EntryPrefix get prefix for all entries for a single field
func EntryTypePrefix ¶
EntryTypePrefix get prefix for all entries for a single field
func EntryValuePrefix ¶
EntryValuePrefix get prefix for all terms for a field
func FieldKeyParse ¶
FieldKeyParse extracts the string name of a graph from a byte key
func FieldPrefix ¶
func FieldPrefix() []byte
FieldPrefix returns the byte array prefix for all graph entry keys
func GetBytesTerm ¶
GetBytesTerm converts the bytes representation of a term back to its original value
func TermPrefix ¶
TermPrefix get a prefix for all the terms for a single field
func TermTypePrefix ¶
TermTypePrefix get a prefix for all the terms of a particular type for a single field
Types ¶
type Doc ¶
type Doc struct { Entries [][]byte `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` // contains filtered or unexported fields }
func (*Doc) Descriptor
deprecated
func (*Doc) GetEntries ¶
func (*Doc) ProtoMessage ¶
func (*Doc) ProtoMessage()
func (*Doc) ProtoReflect ¶
func (x *Doc) ProtoReflect() protoreflect.Message
type KVIndex ¶
type KVIndex struct { KV kvi.KVInterface Fields map[string][]string }
KVIndex is a index implementation using the generic key value store
func (*KVIndex) FieldNumbers ¶
FieldNumbers returns all entries values, in numeric order
func (*KVIndex) FieldStringTermCounts ¶
func (idx *KVIndex) FieldStringTermCounts(field string) chan KVTermCount
FieldStringTermCounts get all terms, that are strings, and their counts for a particular field
func (*KVIndex) FieldTermCounts ¶
func (idx *KVIndex) FieldTermCounts(field string) chan KVTermCount
FieldTermCounts get all terms, and their counts for a particular field
func (*KVIndex) FieldTermNumberMax ¶
FieldTermNumberMax finds the max number term for a field
func (*KVIndex) FieldTermNumberMin ¶
FieldTermNumberMin for a field, get the min number term value
func (*KVIndex) FieldTermNumberRange ¶
func (idx *KVIndex) FieldTermNumberRange(field string, min, max float64) chan KVTermCount
FieldTermNumberRange gets all number term counts between min and max
func (*KVIndex) FieldTerms ¶
FieldTerms list all unique terms held by a field
func (*KVIndex) GetTermMatch ¶
func (idx *KVIndex) GetTermMatch(ctx context.Context, field string, value interface{}, maxCount int) chan string
GetTermMatch find all documents where field has the value
func (*KVIndex) ListFields ¶
ListFields lists all indexed fields
func (*KVIndex) RemoveField ¶
RemoveField removes an indexed field
type KVTermCount ¶
KVTermCount Get all terms and their counts
type TermType ¶
type TermType byte
TermType defines in a term is a Number or a String
func EntryKeyParse ¶
EntryKeyParse take entry key and parse out field term and document id
func GetTermBytes ¶
GetTermBytes converts a term into its bytes representation and returns its type