Documentation
¶
Index ¶
- type Active
- func (f *Active) Append(docs storage.DocBlock, metas storage.WalBlock, wg *sync.WaitGroup) (err error)
- func (f *Active) AppendIDs(ids []seq.ID) []uint32
- func (f *Active) Contains(id seq.MID) bool
- func (f *Active) Fetch(ctx context.Context, ids []seq.ID, noSkipMasks bool) ([][]byte, error)
- func (f *Active) FindLIDs(ctx context.Context, ids []seq.ID) ([]seq.LID, error)
- func (f *Active) GetAllDocuments() []uint32
- func (f *Active) Info() *frac.Info
- func (f *Active) IsIntersecting(from, to seq.MID) bool
- func (f *Active) Release()
- func (f *Active) Replay(ctx context.Context) error
- func (f *Active) Search(ctx context.Context, params processor.SearchParams) (*seq.QPR, error)
- func (f *Active) String() string
- func (f *Active) Suicide()
- func (f *Active) UpdateStats(minMID, maxMID seq.MID, docCount uint32, sizeCount uint64)
- type ActiveIndexer
- type ActiveLIDs
- type ActiveSealingSource
- func (src *ActiveSealingSource) BlockOffsets() []uint64
- func (src *ActiveSealingSource) Docs() iter.Seq2[Document, error]
- func (src *ActiveSealingSource) IDs() iter.Seq2[frac.DocLocation, error]
- func (src *ActiveSealingSource) Info() *frac.Info
- func (src *ActiveSealingSource) SortDocs() error
- func (src *ActiveSealingSource) TokenTriplets() iter.Seq2[string, iter.Seq2[frac.TokenLIDs, error]]
- type ActiveWriter
- type BulkStats
- type BulkStatsCollector
- type DocsPositions
- type Document
- type IndexedDocBlock
- type SeqIDCmp
- type TokenLIDs
- type TokenList
- func (tl *TokenList) Append(tokens [][]byte, fieldsLengths []int, tokenLIDsPlaces []*TokenLIDs) []*TokenLIDs
- func (tl *TokenList) FindPattern(ctx context.Context, t parser.Token) ([]uint32, error)
- func (tl *TokenList) GetAllTokenLIDs() *TokenLIDs
- func (tl *TokenList) GetFieldSizes() map[string]uint32
- func (tl *TokenList) GetTIDsByField(f string) []uint32
- func (tl *TokenList) GetValByTID(tid uint32, _ string) []byte
- func (tl *TokenList) Provide(tid uint32) *TokenLIDs
- func (tl *TokenList) Stop()
- type UInt64s
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Active ¶
type Active struct {
Config *frac.Config
BaseFileName string
MIDs *UInt64s
RIDs *UInt64s
DocBlocks *UInt64s
TokenList *TokenList
DocsPositions *DocsPositions
IDsToLIDs *ActiveLIDs
// contains filtered or unexported fields
}
func NewActive ¶
func NewActive( baseFileName string, activeIndexer *ActiveIndexer, readLimiter *storage.ReadLimiter, docsCache *cache.ConcurrentCache[[]byte], sortCache *cache.ConcurrentCache[[]byte], cfg *frac.Config, skipMaskProvider frac.SkipMaskProvider, ) *Active
func (*Active) Append ¶
func (f *Active) Append(docs storage.DocBlock, metas storage.WalBlock, wg *sync.WaitGroup) (err error)
Append causes data to be written on disk and sends metas to index workers.
func (*Active) GetAllDocuments ¶
type ActiveIndexer ¶
type ActiveIndexer struct {
// contains filtered or unexported fields
}
func NewActiveIndexer ¶
func NewActiveIndexer(workerCount, chLen int) (*ActiveIndexer, func())
type ActiveLIDs ¶
type ActiveLIDs struct {
// contains filtered or unexported fields
}
func NewActiveLIDs ¶
func NewActiveLIDs() *ActiveLIDs
func (*ActiveLIDs) SetMultiple ¶
func (al *ActiveLIDs) SetMultiple(ids []seq.ID, lids []uint32)
type ActiveSealingSource ¶
type ActiveSealingSource struct {
// contains filtered or unexported fields
}
func NewActiveSealingSource ¶
func NewActiveSealingSource(active *Active, params frac.SealParams) (*ActiveSealingSource, error)
func (*ActiveSealingSource) BlockOffsets ¶
func (src *ActiveSealingSource) BlockOffsets() []uint64
func (*ActiveSealingSource) Docs ¶
func (src *ActiveSealingSource) Docs() iter.Seq2[Document, error]
Docs returns an iterator for documents with their IDs. Handles duplicate IDs (for nested indexes).
func (*ActiveSealingSource) IDs ¶
func (src *ActiveSealingSource) IDs() iter.Seq2[frac.DocLocation, error]
func (*ActiveSealingSource) Info ¶
func (src *ActiveSealingSource) Info() *frac.Info
func (*ActiveSealingSource) SortDocs ¶
func (src *ActiveSealingSource) SortDocs() error
SortDocs sorts documents and writes them in compressed form to disk. Creates a temporary file that is then renamed to the final one.
type ActiveWriter ¶
type ActiveWriter struct {
// contains filtered or unexported fields
}
func NewActiveWriter ¶
func NewActiveWriter(docsFile, walFile *os.File, docsOffset, walOffset int64, skipFsync bool) *ActiveWriter
NewActiveWriter creates a writer for *.wal files
func (*ActiveWriter) Stop ¶
func (a *ActiveWriter) Stop()
type BulkStats ¶
type BulkStats struct {
// contains filtered or unexported fields
}
BulkStats holds statistics for bulk operations
type BulkStatsCollector ¶
type BulkStatsCollector struct {
// contains filtered or unexported fields
}
BulkStatsCollector collects and periodically logs bulk operation statistics
func NewBulkStatsCollector ¶
func NewBulkStatsCollector(period time.Duration, queueSize int) *BulkStatsCollector
NewBulkStatsCollector creates a new stats collector with specified parameters
func (*BulkStatsCollector) Add ¶
func (c *BulkStatsCollector) Add(bs BulkStats)
func (*BulkStatsCollector) Stop ¶
func (c *BulkStatsCollector) Stop()
type DocsPositions ¶
type DocsPositions struct {
// contains filtered or unexported fields
}
func NewSyncDocsPositions ¶
func NewSyncDocsPositions() *DocsPositions
func (*DocsPositions) SetMultiple ¶
SetMultiple returns indexes of added ids.
type TokenLIDs ¶
type TokenLIDs struct {
// contains filtered or unexported fields
}
func (*TokenLIDs) PutLIDsInQueue ¶
func (*TokenLIDs) SortedLIDsUnsafe ¶
SortedLIDs returns pre-merged LIDs. Only safe to call after the fraction is frozen and lids queue was drained.