Versions in this module Expand all Collapse all v1 v1.3.0 Jun 23, 2026 Changes in this version + const OffsetBitmapCachedSize v1.2.1 Jun 21, 2026 Changes in this version + const DocumentIdSize + const DocumentLengthEntrySize + const FieldHeaderSize + const HeaderSize + const MagicNumber + const MaxRawValueSize + const PostingListHeaderSize + const TokenFrequencyEntrySize + const TokenSize + const VersionV1 + func CloseAndRemove(file *os.File) + func CompareTokens(a, b Token) (cmp int) + type Document struct + Fields []*FieldDefinition + Id DocumentId + type DocumentId struct + Value RawValue + type DocumentLengthEntry struct + Index uint64 + Length uint64 + type Field struct + AvgDocumentLength float64 + DocumentLengths []DocumentLengthEntry + Tokens Tokens + type FieldDefinition struct + Hash uint64 + Length uint64 + Tokens []*TokenDefinition + type FieldHeader struct + AvgDocumentLength float64 + DocumentLengthCount uint64 + Hash uint64 + TokenCount uint64 + type Header struct + FieldCount uint64 + Magic uint64 + TotalDocuments uint64 + TotalPostingLists uint64 + TotalTokenFrequencies uint64 + Version uint16 + type Merger struct + TempDir string + func (m *Merger) CreateTemp(pattern string) (file *os.File, err error) + func (m *Merger) Merge(name string, a, b *Storage) (err error) + type PostingList struct + Data []byte + func (l *PostingList) Bitmap(dst *roaring64.Bitmap) + type PostingListHeader struct + Size uint64 + type RawValue struct + Data [MaxRawValueSize]byte + Size uint64 + func RawValueFrom[T ~string | ~[]byte](b T) (v RawValue) + func (v *RawValue) Bytes() (b []byte) + func (v *RawValue) Hash() (hash uint64) + func (v *RawValue) UnsafeString() (s string) + type Storage struct + Buffer []byte + DocumentsIds []DocumentId + Fields map[uint64]*Field + File *os.File + Initialized bool + PostingLists []PostingList + Size uint64 + TokenFrequencies []TokenFrequencyEntry + Version uint16 + func (s *Storage) BuildFrom(docs ...*Document) + func (s *Storage) Close() (err error) + func (s *Storage) ColdInitialize() + func (s *Storage) Load(name string) (err error) + func (s *Storage) Reset() (err error) + func (s *Storage) SaveTo(name string) (err error) + func (s *Storage) SortAndBuildFrom(docs ...*Document) + type Token struct + FrequenciesIndex uint64 + FrequencyCount uint64 + PostingListIndex uint64 + Value RawValue + type TokenDefinition struct + Frequency uint64 + Value []byte + type TokenFrequencyEntry struct + DocumentIndex uint64 + Frequency uint64 + type Tokens []Token + func (s *Tokens) GetBytes(b []byte) (token *Token, found bool) + func (s *Tokens) GetBytesOrNear(b []byte) (token *Token, found bool) + func (s *Tokens) GetString(ss string) (token *Token, found bool) + func (s *Tokens) IterBytes(lo, hi []byte) (seq iter.Seq[*Token])