Versions in this module Expand all Collapse all v0 v0.1.3 Sep 30, 2025 Changes in this version + const DebugLevel + const ErrorLevel + const HolderNameACMatcher + const HolderNameDefault + const InfoLevel + const LinearSearchLengthThreshold + const MaxBEFieldID + const MaxBEValueID + const NULLENTRY + const WildcardFieldName + var LogLevel int = InfoLevel + var Logger BEIndexLogger = &DefaultLogger + func HasHolderBuilder(name string) bool + func LogDebugIf(condition bool, format string, v ...interface{}) + func LogErrIf(condition bool, format string, v ...interface{}) + func LogIfErr(err error, format string, v ...interface{}) + func LogInfoIf(condition bool, format string, v ...interface{}) + func NewInt32Values(o ...int32) (res []interface{}) + func NewInt32Values2(v int32, o ...int32) (res []interface{}) + func NewInt64Values(o ...int64) (res []interface{}) + func NewInt64Values2(v int64, o ...int64) (res []interface{}) + func NewIntValues(o ...int) (res []interface{}) + func NewIntValues2(v int, o ...int) (res []interface{}) + func NewStrValues(ss ...string) (res []interface{}) + func NewStrValues2(v string, ss ...string) (res []interface{}) + func PutCollector(c *DocIDCollector) + func RegisterEntriesHolder(name string, builder HolderBuilder) error + type ACEntriesHolder struct + KeepBuilder bool + func NewACEntriesHolder(option ACHolderOption) *ACEntriesHolder + func (h *ACEntriesHolder) AddFieldEID(field *fieldDesc, values Values, eid EntryID) error + func (h *ACEntriesHolder) CompileEntries() + func (h *ACEntriesHolder) DumpEntries(buffer *strings.Builder) + func (h *ACEntriesHolder) EnableDebug(debug bool) + func (h *ACEntriesHolder) GetEntries(field *fieldDesc, assigns Values) (CursorGroup, error) + type ACHolderOption struct + QuerySep string + type Assignments map[BEField]Values + func (ass Assignments) Size() (size int) + type BEField string + type BEIndex interface + DumpEntries func() string + DumpEntriesSummary func() string + Retrieve func(queries Assignments, opt ...IndexOpt) (DocIDList, error) + RetrieveWithCollector func(Assignments, ResultCollector, ...IndexOpt) error + func NewSizeGroupedBEIndex() BEIndex + type BEIndexLogger interface + Debugf func(format string, v ...interface{}) + Errorf func(format string, v ...interface{}) + Infof func(format string, v ...interface{}) + type BoolValues struct + Incl bool + Value Values + func (v *BoolValues) JSONString() string + func (v *BoolValues) String() string + type BooleanExpr struct + Field BEField + func NewBoolExpr(field BEField, inc bool, v Values) *BooleanExpr + func NewBoolExpr2(field BEField, expr BoolValues) *BooleanExpr + type CompactedBEIndex struct + func NewCompactedBEIndex() *CompactedBEIndex + func (bi *CompactedBEIndex) DumpEntries() string + func (bi *CompactedBEIndex) DumpEntriesSummary() string + func (bi *CompactedBEIndex) Retrieve(queries Assignments, opts ...IndexOpt) (result DocIDList, err error) + func (bi *CompactedBEIndex) RetrieveWithCollector(queries Assignments, collector ResultCollector, opts ...IndexOpt) (err error) + type ConjID uint64 + func NewConjID(docID DocID, index, size int) ConjID + func (id ConjID) DocID() DocID + func (id ConjID) Index() int + func (id ConjID) Size() int + type Conjunction struct + Expressions map[BEField]*BoolValues + func NewConjunction() *Conjunction + func (conj *Conjunction) AddBoolExpr(expr *BooleanExpr) *Conjunction + func (conj *Conjunction) AddBoolExprs(exprs ...*BooleanExpr) + func (conj *Conjunction) AddExpression(expr *BooleanExpr) *Conjunction + func (conj *Conjunction) AddExpression3(field string, include bool, values Values) *Conjunction + func (conj *Conjunction) CalcConjSize() (size int) + func (conj *Conjunction) Exclude(field BEField, values Values) *Conjunction + func (conj *Conjunction) In(field BEField, values Values) *Conjunction + func (conj *Conjunction) Include(field BEField, values Values) *Conjunction + func (conj *Conjunction) JSONString() string + func (conj *Conjunction) NotIn(field BEField, values Values) *Conjunction + func (conj *Conjunction) String() string + type CursorGroup []*EntriesCursor + func (cg CursorGroup) DumpEntries(sb *strings.Builder) + type DefaultEntriesHolder struct + func (h *DefaultEntriesHolder) AddFieldEID(field *fieldDesc, values Values, eid EntryID) (err error) + func (h *DefaultEntriesHolder) AppendEntryID(key Key, id EntryID) + func (h *DefaultEntriesHolder) CompileEntries() + func (h *DefaultEntriesHolder) DumpEntries(buffer *strings.Builder) + func (h *DefaultEntriesHolder) EnableDebug(debug bool) + func (h *DefaultEntriesHolder) GetEntries(field *fieldDesc, assigns Values) (r CursorGroup, e error) + type DefaultLogger struct + func (l *DefaultLogger) Debugf(format string, v ...interface{}) + func (l *DefaultLogger) Errorf(format string, v ...interface{}) + func (l *DefaultLogger) Infof(format string, v ...interface{}) + type DocID int64 + type DocIDCollector struct + func NewDocIDCollector() *DocIDCollector + func PickCollector() *DocIDCollector + func (c *DocIDCollector) Add(docID DocID, _ ConjID) + func (c *DocIDCollector) DocCount() int + func (c *DocIDCollector) GetDocIDs() (ids DocIDList) + func (c *DocIDCollector) GetDocIDsInto(ids *DocIDList) + func (c *DocIDCollector) Reset() + type DocIDList []DocID + func (s DocIDList) Contain(id DocID) bool + func (s DocIDList) Len() int + func (s DocIDList) Less(i, j int) bool + func (s DocIDList) Sub(other DocIDList) (r DocIDList) + func (s DocIDList) Swap(i, j int) + type Document struct + Cons []*Conjunction + ID DocID + func NewDocument(id DocID) *Document + func (doc *Document) AddConjunction(cons ...*Conjunction) + func (doc *Document) AddConjunctions(conj *Conjunction, others ...*Conjunction) + func (doc *Document) JSONString() string + func (doc *Document) String() string + type Entries []EntryID + func (s Entries) DocString() []string + func (s Entries) Len() int + func (s Entries) Less(i, j int) bool + func (s Entries) Swap(i, j int) + type EntriesContainer struct + func (c *EntriesContainer) DumpString(buf *strings.Builder) + type EntriesCursor struct + func NewEntriesCursor(key QKey, entries Entries) *EntriesCursor + func (cur *EntriesCursor) DumpEntries(sb *strings.Builder) + func (sc *EntriesCursor) GetCurEntryID() EntryID + func (sc *EntriesCursor) LinearSkip(id EntryID) EntryID + func (sc *EntriesCursor) LinearSkipTo(id EntryID) EntryID + func (sc *EntriesCursor) Skip(id EntryID) EntryID + func (sc *EntriesCursor) SkipTo(id EntryID) EntryID + type EntriesHolder interface + AddFieldEID func(field *fieldDesc, values Values, eid EntryID) error + CompileEntries func() + DumpEntries func(buffer *strings.Builder) + EnableDebug func(debug bool) + GetEntries func(field *fieldDesc, assigns Values) (CursorGroup, error) + func NewDefaultEntriesHolder() EntriesHolder + func NewEntriesHolder(name string) EntriesHolder + type EntryID uint64 + func NewEntryID(id ConjID, incl bool) EntryID + func (entry EntryID) DocString() string + func (entry EntryID) GetConjID() ConjID + func (entry EntryID) IsExclude() bool + func (entry EntryID) IsInclude() bool + func (entry EntryID) IsNULLEntry() bool + type FieldCursor struct + func NewFieldCursor(cursors ...*EntriesCursor) *FieldCursor + func (sg *FieldCursor) AddPostingList(cursor *EntriesCursor) + func (sg *FieldCursor) DumpEntries() string + func (sg *FieldCursor) GetCurConjID() ConjID + func (sg *FieldCursor) GetCurEntryID() EntryID + func (sg *FieldCursor) ReachEnd() bool + func (sg *FieldCursor) Skip(id EntryID) (newMin EntryID) + func (sg *FieldCursor) SkipTo(id EntryID) (newMin EntryID) + type FieldCursors []*FieldCursor + func (s FieldCursors) Dump() string + func (s FieldCursors) DumpCurrent() string + func (s FieldCursors) Len() int + func (s FieldCursors) Less(i, j int) bool + func (s FieldCursors) Sort() + func (s FieldCursors) Swap(i, j int) + type FieldOption struct + Container string + Parser parser.FieldValueParser + type HolderBuilder func() EntriesHolder + type IndexOpt func(ctx *retrieveContext) + func WithCollector(fn ResultCollector) IndexOpt + func WithDumpEntries() IndexOpt + func WithStepDetail() IndexOpt + type IndexerBuilder struct + func NewCompactIndexerBuilder() *IndexerBuilder + func NewIndexerBuilder() *IndexerBuilder + func (b *IndexerBuilder) AddDocument(doc *Document) error + func (b *IndexerBuilder) BuildIndex() BEIndex + func (b *IndexerBuilder) ConfigField(field BEField, settings FieldOption) + type IndexerSettings struct + FieldConfig map[BEField]FieldOption + type Key uint64 + func NewKey(fieldID uint64, valueID uint64) Key + func (key Key) GetFieldID() uint64 + func (key Key) GetValueID() uint64 + func (key Key) String() string + type QKey struct + func (key *QKey) String() string + type ResultCollector interface + Add func(id DocID, conj ConjID) + GetDocIDs func() (ids DocIDList) + GetDocIDsInto func(ids *DocIDList) + type SizeGroupedBEIndex struct + func (bi *SizeGroupedBEIndex) DumpEntries() string + func (bi *SizeGroupedBEIndex) DumpEntriesSummary() string + func (bi *SizeGroupedBEIndex) Retrieve(queries Assignments, opts ...IndexOpt) (result DocIDList, err error) + func (bi *SizeGroupedBEIndex) RetrieveWithCollector(queries Assignments, collector ResultCollector, opts ...IndexOpt) (err error) + type Values []interface + func NewValues(o ...interface{}) (res Values) + func NewValues2(v interface{}, o ...interface{}) (res Values)