Versions in this module Expand all Collapse all v0 v0.8.1 Sep 20, 2019 Changes in this version + const DocNum1HitFinished + const FSTValEncoding1Hit + const FSTValEncodingGeneral + const FSTValEncodingMask + const FooterSize + const Type + const Version + var DefaultFileMergerBufferSize = 1024 * 1024 + var NewSegmentBufferAvgBytesPerDocFactor float64 = 1.0 + var NewSegmentBufferNumResultsBump int = 100 + var NewSegmentBufferNumResultsFactor float64 = 1.0 + var NormBits1Hit = uint64(math.Float32bits(float32(1))) + var ValidateDocFields = func(field document.Field) error + var ValidateMerge = func(segments []*Segment, memSegments []*SegmentBase, drops []*roaring.Bitmap, ...) error + func FSTValDecode1Hit(v uint64) (docNum uint64, normBits uint64) + func FSTValEncode1Hit(docNum uint64, normBits uint64) uint64 + func Merge(segments []*Segment, drops []*roaring.Bitmap, path string, chunkFactor uint32, ...) ([][]uint64, uint64, error) + func MergeSegmentBases(segmentBases []*SegmentBase, drops []*roaring.Bitmap, path string, ...) ([][]uint64, uint64, error) + func MergeToWriter(segments []*SegmentBase, drops []*roaring.Bitmap, chunkFactor uint32, ...) (newDocNums [][]uint64, ...) + func Open(path string) (segment.Segment, error) + func PersistSegmentBase(sb *SegmentBase, path string) error + func ReadDocValueBoundary(chunk int, metaHeaders []MetaData) (uint64, uint64) + type CountHashWriter struct + func NewCountHashWriter(w io.Writer) *CountHashWriter + func NewCountHashWriterWithStatsReporter(w io.Writer, s segment.StatsReporter) *CountHashWriter + func (c *CountHashWriter) Count() int + func (c *CountHashWriter) Sum32() uint32 + func (c *CountHashWriter) Write(b []byte) (int, error) + type Dictionary struct + func (d *Dictionary) AutomatonIterator(a vellum.Automaton, startKeyInclusive, endKeyExclusive []byte) segment.DictionaryIterator + func (d *Dictionary) Contains(key []byte) (bool, error) + func (d *Dictionary) Iterator() segment.DictionaryIterator + func (d *Dictionary) OnlyIterator(onlyTerms [][]byte, includeCount bool) segment.DictionaryIterator + func (d *Dictionary) PostingsList(term []byte, except *roaring.Bitmap, prealloc segment.PostingsList) (segment.PostingsList, error) + func (d *Dictionary) PrefixIterator(prefix string) segment.DictionaryIterator + func (d *Dictionary) RangeIterator(start, end string) segment.DictionaryIterator + type DictionaryIterator struct + func (i *DictionaryIterator) Next() (*index.DictEntry, error) + type Location struct + func (l *Location) ArrayPositions() []uint64 + func (l *Location) End() uint64 + func (l *Location) Field() string + func (l *Location) Pos() uint64 + func (l *Location) Size() int + func (l *Location) Start() uint64 + type MetaData struct + DocDvOffset uint64 + DocNum uint64 + type Posting struct + func (p *Posting) Frequency() uint64 + func (p *Posting) Locations() []segment.Location + func (p *Posting) Norm() float64 + func (p *Posting) Number() uint64 + func (p *Posting) Size() int + type PostingsIterator struct + Actual roaring.IntPeekable + ActualBM *roaring.Bitmap + func PostingsIteratorFrom1Hit(docNum1Hit, normBits1Hit uint64, includeFreqNorm, includeLocs bool) (*PostingsIterator, error) + func PostingsIteratorFromBitmap(bm *roaring.Bitmap, includeFreqNorm, includeLocs bool) (*PostingsIterator, error) + func (i *PostingsIterator) Advance(docNum uint64) (segment.Posting, error) + func (i *PostingsIterator) Next() (segment.Posting, error) + func (i *PostingsIterator) Size() int + func (p *PostingsIterator) DocNum1Hit() (uint64, bool) + type PostingsList struct + func (p *PostingsList) Count() uint64 + func (p *PostingsList) Iterator(includeFreq, includeNorm, includeLocs bool, prealloc segment.PostingsIterator) segment.PostingsIterator + func (p *PostingsList) OrInto(receiver *roaring.Bitmap) + func (p *PostingsList) Size() int + type Segment struct + func (s *Segment) AddRef() + func (s *Segment) CRC() uint32 + func (s *Segment) ChunkFactor() uint32 + func (s *Segment) Close() (err error) + func (s *Segment) Data() []byte + func (s *Segment) DecRef() (err error) + func (s *Segment) DictAddr(field string) (uint64, error) + func (s *Segment) DocValueOffset() uint64 + func (s *Segment) FieldsIndexOffset() uint64 + func (s *Segment) NumDocs() uint64 + func (s *Segment) Path() string + func (s *Segment) Size() int + func (s *Segment) StoredIndexOffset() uint64 + func (s *Segment) Version() uint32 + type SegmentBase struct + func AnalysisResultsToSegmentBase(results []*index.AnalysisResult, chunkFactor uint32) (*SegmentBase, uint64, error) + func InitSegmentBase(mem []byte, memCRC uint32, chunkFactor uint32, fieldsMap map[string]uint16, ...) (*SegmentBase, error) + func (s *SegmentBase) Count() uint64 + func (s *SegmentBase) Dictionary(field string) (segment.TermDictionary, error) + func (s *SegmentBase) DocID(num uint64) ([]byte, error) + func (s *SegmentBase) DocNumbers(ids []string) (*roaring.Bitmap, error) + func (s *SegmentBase) Fields() []string + func (s *SegmentBase) VisitDocument(num uint64, visitor segment.DocumentFieldValueVisitor) error + func (s *SegmentBase) VisitDocumentFieldTerms(localDocNum uint64, fields []string, visitor index.DocumentFieldTermVisitor, ...) (segment.DocVisitState, error) + func (s *SegmentBase) VisitableDocValueFields() ([]string, error) + func (sb *SegmentBase) AddRef() + func (sb *SegmentBase) Close() (err error) + func (sb *SegmentBase) DecRef() (err error) + func (sb *SegmentBase) Size() int